|
-
May 21st, 2001, 09:59 AM
#5
Re: Read file to String variable
To convert a byte array to a string, you can simply assign it to the string variable. For example, the following code correctly produces the output ABC. Note that the byte array is in Unicode format. You can use the StrConv function (VB) to convert to and from Unicode.
Dim arrByte(5) as Byte, str as string
arrByte(0) = 65
arrByte(1) = 0
arrByte(2) = 66
arrByte(3) = 0
arrByte(4) = 67
arrByte(5) = 0
str = arrByte
MsgBox str
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|