开发者

C# What is the difference between byte[] and char[] [closed]

开发者_Go百科 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

What is the difference between byte[] and char[]?

Differentiate more from usage perspective. Can they be used interchangeably?


byte represents a byte. It is always 8-bits wide. char represents a unicode character, and thus is two bytes (i.e. 16 bits) wide. Use byte[] if you're dealing with raw bytes, and char[] (or better yet string) if you're dealing with strings.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜