Worrow Posted September 16, 2003 Posted September 16, 2003 Is there any way to convert an array of byte to string without making several chrw() call? Thanks in advance. Quote
Administrators PlausiblyDamp Posted September 16, 2003 Administrators Posted September 16, 2003 given an array of bytes held in b() somethging similar to the following should work Imports System.IO Dim ms as new MemoryStream(b) dim sr as new StreamReader(ms) dim s as string = sr.ReadToEnd() Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
*Experts* mutant Posted September 16, 2003 *Experts* Posted September 16, 2003 You could also do something like this: Dim b(3) As Byte b(1) = 97 b(2) = 97 b(3) = 97 b(0) = 97 Dim s As String = System.Text.ASCIIEncoding.ASCII.GetString(b) Now s will contain "aaaa". Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.