Array of sbyte to string conversion

A

acerblue

Hi,
I've an array of sbyte with null char termination. I'd like to convert it to
string type. How can I do that ?
Thanks
ssggys
 
J

Jon Skeet [C# MVP]

acerblue said:
I've an array of sbyte with null char termination. I'd like to convert it to
string type. How can I do that ?

Well, you'll need to convert it to an array of bytes first, and then
use an Encoding to convert those bytes (without the null).

Do you know how the text was encoded?
 

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