Unsafe{ sbyte[] StrSbyte = new sbyte[] { 123, 121, 121,};
String Strvar = new string(PtrSbyte);
Console.WriteLine(*PtrSbyte);
Console.WriteLine(Strvar);
}
String Strvar = new string(PtrSbyte);
Console.WriteLine(*PtrSbyte);
Console.WriteLine(Strvar);
}
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
AlanPosted Jul 19, 2007, 9:22 AM
sbyte[] StrSbyte = new sbyte[] { 123, 121, 121};
unsafe
{
fixed(sbyte* PtrSbyte = StrSbyte)
{
String Strvar = new string(PtrSbyte);
Console.WriteLine(*PtrSbyte);
Console.WriteLine(Strvar);
}
}