UInt16 num = 1234; string strNum = num.ToString();
UInt16 num = 1234; string strNum = num.ToString("X"); // returns "4D2"The first example simply converts a UInt16 value to its string representation, while the second example specifies a format for the string representation (in this case, using hexadecimal notation). Package Library: The System UInt16 ToString method is part of the System namespace in the .NET Framework Class Library.