PC Review


Reply
Thread Tools Rate Thread

Converting to string

 
 
Ohad Asor via DotNetMonster.com
Guest
Posts: n/a
 
      4th Jan 2005
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 Removed)

Thanks a lot,
Ohad.

--
Message posted via http://www.dotnetmonster.com
 
Reply With Quote
 
 
 
 
Cor Ligthert
Guest
Posts: n/a
 
      4th Jan 2005
Just to prevent answers on a lot of places


 
Reply With Quote
 
Shiva
Guest
Posts: n/a
 
      4th Jan 2005
ASCIIEncoding e = new ASCIIEncoding();
s = e.GetString(b) + new String (c);

"Ohad Asor via DotNetMonster.com" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
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 Removed)

Thanks a lot,
Ohad.

--
Message posted via http://www.dotnetmonster.com


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
incorrect result when converting from basic string to System::String Vivienne Microsoft C# .NET 1 20th Aug 2007 07:00 AM
Re: Converting a string to a string that contains the ASCII values of each letter in the origional string Jay B. Harlow [MVP - Outlook] Microsoft C# .NET 7 1st Aug 2003 06:03 PM
Re: Converting a string to a string that contains the ASCII values of each letter in the origional string Mikael Jansson Microsoft C# .NET 0 31st Jul 2003 08:42 PM
Re: Converting a string to a string that contains the ASCII values of each letter in the origional string Jon Skeet Microsoft C# .NET 0 31st Jul 2003 08:38 PM
Re: Converting a string to a string that contains the ASCII values of each letter in the origional string Frank Oquendo Microsoft C# .NET 0 31st Jul 2003 08:36 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:41 AM.