How to write code Convert Byte to String in Vb.net
Hi
Plz. Help me
how to write code convert Byte to String in Vb.net
Regards
Sanjay
Junk
Hi
Plz. Help me
how to write code convert Byte to String in Vb.net
Regards
Sanjay
by sanjay_textware Accepted solution
by tony hopkinson Accepted solution
array of bytes is something like
Dim dBytes As Byte() = ...
Dim str As String
Dim enc As New System.Text.ASCIIEncoding()
str = enc.GetString(dBytes)
ASCIIEncoding assumes bytearray each byte is a single character. The default Unicode would assume each byte pair is a single character.
PS be careful about null's (Char(0)).
This discussion is closed to new replies.
Sort by Trending