Converting to string

  • Thread starter Ohad Asor via DotNetMonster.com
  • Start date
O

Ohad Asor via DotNetMonster.com

Hi,

I have (in c#):

byte b = new byte[12];
char c = new char[12];
string s;

How do I make s contain the data in b and c?
Please cc to my mailbox: (e-mail address removed)

Thanks a lot,
Ohad.
 
S

Shiva

ASCIIEncoding e = new ASCIIEncoding();
s = e.GetString(b) + new String (c);

Hi,

I have (in c#):

byte b = new byte[12];
char c = new char[12];
string s;

How do I make s contain the data in b and c?
Please cc to my mailbox: (e-mail address removed)

Thanks a lot,
Ohad.
 

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

Similar Threads

char[] and byte[] to string 1
calling cpp file from c# 2
String Formatting 4
SmtpMail with content id 2
convert string to byte array 13
Converting C# string to char* 3
Calling c++ from c# 1
Unicode in .NET 8

Top