Character string question

  • Thread starter Thread starter jiangyh
  • Start date Start date
J

jiangyh

hi there:

I have a question that how to get the character strings length.I want to get byte number about that character strings.

Any advice I appreciate your help

regards jiangyh
 
hi there :


I already resolve this question like buttom


Encoding uniCode = Encoding.Unicode;
byte[] inputByte = uniCode.GetBytes(_inputValue);
Int64 byteLength = inputByte.Length


"jiangyh" <[email protected]> дÈëÓʼþ hi there:

I have a question that how to get the character strings length.I want to get byte number about that character strings.

Any advice I appreciate your help

regards jiangyh
 
hi guys:


only have a little question,if I get the string type length,is true,but if I want get int and string length,is wrong.

how to get 2004/04/04 length.

thank you very much
"jiangyh" <[email protected]> дÈëÓʼþ hi there:

I have a question that how to get the character strings length.I want to get byte number about that character strings.

Any advice I appreciate your help

regards jiangyh
 
jiangyh said:
I have a question that how to get the character strings length.I want
to get byte number about that character strings.

Number of bytes in which encoding though?

The length of a string in *characters* is available through just the
Length property.
 
Back
Top