Converting a Byte array into a string

F

Fabiano

Please,

how can i convert a byte array into a string?

i'm using with no sucess:

byte[] tmpData = writer.ToArray();
ASCIIEncoding tmpXML = new ASCIIEncoding();
tmpXML.GetString(tmpData);
return tmpXML.ToString();

tks in adv.

Fabiano
 
J

Jay B. Harlow [MVP - Outlook]

Fabiano,
GetString is a function that returns a string.

Have you tried using the value it returns?
byte[] tmpData = writer.ToArray();
ASCIIEncoding tmpXML = new ASCIIEncoding();
return tmpXML.GetString(tmpData);

Hope this helps
Jay

Fabiano said:
Please,

how can i convert a byte array into a string?

i'm using with no sucess:

byte[] tmpData = writer.ToArray();
ASCIIEncoding tmpXML = new ASCIIEncoding();
tmpXML.GetString(tmpData);
return tmpXML.ToString();

tks in adv.

Fabiano
 

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

Top