Byte to string

Stormweaver1

Member
Joined
Jun 12, 2006
Messages
13
Programming Experience
Beginner
I am wondering how I can turn a byte into a string.

I want to create a for loop to cycle throgh ASCii. Any help is apreciated.

Anybody got any tips?
 
Try this...

VB.NET:
Dim dBytes As Byte() = ...
Dim str As String
Dim Encodng As New System.Text.ASCIIEncoding()
str = Encodng.GetString(dBytes)
 
If you're only converting a single byte there is also the System.Convert class.
VB.NET:
Dim b As Byte = 65
Dim c As Char = Convert.ToChar(b)
MsgBox(c.ToString)
 
Back
Top