convert byte array to ASCII

ar_pad

Active member
Joined
Jun 5, 2006
Messages
26
Programming Experience
Beginner
hi,
How to convert byte array to ASCII in VB.NET
System.Text.Encoding.ASCII.Getstring(y)
it gives the data like 52414D41 .
but i need "RAMA" instead of 52414D41.
How? Any help?
Thank U!
 
How did the supposed text become a byte array? From where does it origin?
 
Solved!

I solved it .

Dim b As Byte
Dim s As String = ""
For inttemp As Integer = 0 To strhex.Length - 2 Step 2
b = System.Convert.ToByte(strhex.Substring(inttemp, 2), 16)
s &= Chr(b)
Next
Return s.

Thank You!
 
Well, now when you say it, the coded string did resemble concenated hexadecimal values. Thanks for providing the solution!
 
Back
Top