FileStream

  • Thread starter Thread starter DAVE
  • Start date Start date
D

DAVE

Is there a method of the stream (classes)
where i can get a String to a Byte array

tia
Dave
 
Hi,

Converting from string to byte[] is dependand of the encoding of the
string, instead of using BitConverter as for the others types you need to
use one of the Enocding classes ( ASCIIEncoding, UnicodeEncoding, etc)

Then you have

string GetString( byte[] )
and

byte[] GetBytes( string)



--
Ignacio Machin
machin AT laceupsolutions com


|
| Is there a method of the stream (classes)
| where i can get a String to a Byte array
|
| tia
| Dave
|
|
 

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