C# is a bit different than C++ in handling the primative types...in fact,
quite a bit different. C# actually defines structures (UInt16, UInt32, etc)
and uses the familiar syntax from C++ (int, long, ushort) as aliases for the
new structures. The kewl thing is...in the UInt16 (or unsigned
short/ushort) structure there is a built in function to convert a ushort to
a string (as there is with all of the other primative types.) If you wanted
to write the value out to the console you might do this...
System.UInt16 newint = new System.UInt16();
newint = 16;
Console.WriteLine(newint.ToString());
This would then write out 16 to the screen.
Just remember that in C# all of the primative types have structures
associated with them, and in fact aren't primative types anymore. Your
familiar keywords in C++ have been turned into aliases that are COMPLETELY
interchangable with the newly defined structures in the System namespace.
Hope this helps,
Chris
--
Securing your systems is much like fighting off disease -- as long as you
maintain basic hygiene, you're likely to be okay, but you'll never be
invulnerable.
Steve Shah - Unix Systems Network Administrator
"Prakash" <p.************@gmail.com> wrote in message
news:11*********************@g14g2000cwa.googlegro ups.com...
Hi Friends,
Using Remoting concept, i have send WCHAR[] values from VC++.net
applicaiton to C# applicaiton. In my C# application it is treated as
unsigned shot[]. I need to convert it back to string and display it.
I tried with TypeConverter.GetConverter().ConvertToString()
functionality. and String.Format() functionality. But i get the value
as "System.UInt16" as string.
Please help me to solve this issue.
Regards,
Prakash.