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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
AlanRank #669 · 3.6K reputationPosted Jul 19, 2007, 5:22 AM EDT
sbyte[] StrSbyte = new sbyte[] { 123, 121, 121};
unsafe
{
fixed(sbyte* PtrSbyte = StrSbyte)
{
String Strvar = new string(PtrSbyte);
Console.WriteLine(*PtrSbyte);
Console.WriteLine(Strvar);
}
}