Home > Net >  Byte type to solve
Byte type to solve

Time:11-18

I want to see the 253 how much is the byte type, result output a question mark, there is something wrong with the writing? This value is how much?

Byte [] STR=new byte [1].
STR [0]=253;
String STRR=Encoding. The Default. Get string (STR);

CodePudding user response:

String STRR=BitConverter. ToString (STR);

CodePudding user response:

Thank you, this return hexadecimal number, he is in the middle bar?

CodePudding user response:

In c # Encoding. The Default is the Default unicode, letters and Numbers is a single-byte, other is a double byte character, can find the ASCII table 253 corresponding characters, display is unable to identify? And home monitoring

CodePudding user response:

refer to the second floor stevenjin response:
thank you, this return hexadecimal number, he is in the middle of the bar?

I vs2019 did not show here,
Hexadecimal can use, such as Color r, g, b is 253, Color, FromArgb (0 XFF. Zero XFD, 0 XFD, 0 XFD);
Need other look like?

CodePudding user response:

253 how much is the byte type??? The idea that there is a problem!!!!!!
Encoding. The Default. Get string is to convert the incoming array to specify the character set of strings, apparently {253} does not belong to any known character set, so the only question mark, said the unknown

CodePudding user response:

Binary byte 253 can represent many types of data, such as color, tone and character encoding, etc., in different semantic environment is different, you use a character set encoding formats to convert 253, the results may be unable to identify, so displayed as unreadable form,
  •  Tags:  
  • C#
  • Related