Convertinf a Byte() to a string

  • Thread starter Thread starter Benoit
  • Start date Start date
B

Benoit

Hi, what is the most fastest way to convert a byte stream to a string?

Byte() --> String.

Ben.
 
Converting bytes into a string can be tricky because String is a sequence
of unicode characters and array of bytes may or may not be. To convert a
byte array into unicode characters you can try Text.Decode class. Take a
look at this document:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystemtextdecoderclasstopic.asp

Vladimir [VB.Net team]



--------------------
| From: "Benoit" <[email protected]>
| Subject: Convertinf a Byte() to a string
| Date: Wed, 24 Sep 2003 11:30:31 -0400
| Lines: 7
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
| Message-ID: <#[email protected]>
| Newsgroups: microsoft.public.dotnet.languages.vb
| NNTP-Posting-Host: 207.61.255.130
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:140946
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| Hi, what is the most fastest way to convert a byte stream to a string?
|
| Byte() --> String.
|
| Ben.
|
|
|
 
Hi Benoit, Vladimir,

Decoder, like Encoder, is an abstract class. The Class overview help topic
for these will lead to the Encoding class which actually does the job of
converting from bytes to string (GetString) and vice versa (GetBytes).

Regards,
Fergus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top