NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

UInt16.Format (UInt16, String, NumberFormatInfo)

Converts a numeric value to a String using the specified format string. The UInt16 type is not CLS compliant. The CLS-compliant alternative is Int16.

[C#]
public static string Format(
   ushort value,
   string format,
   NumberFormatInfo info
);
[C++]
public: static String* Format(
   unsigned short value,
   String* format,
   NumberFormatInfo* info
);
[JScript]
public static function Format(
   value : UInt16,
   format : String,
   info : NumberFormatInfo
) : String;

[Visual Basic] The UInt16 type cannot be used in Visual Basic.

Parameters [C#, C++, JScript]

value
The value to be formatted.
format
The format string.
info
The NumberFormatInfo instance used to format the number.

Return Value [C#, C++, JScript]

A string representation of value in the format specified by format.

Remarks [C#, C++, JScript]

The Format method converts a numeric value to a string using the format string given by format. If format is null or an empty string, value is formatted as if the string general format ("G") were specified.

The info parameter specifies the NumberFormatInfo instance used to format the number. If info is null, the numeric format information is obtained from the current locale (see CultureInfo for inforamtion on specific cultures).

The NumberFormatInfo supplies information such as the characters to use for decimal and thousand separators, and the spelling and placement of currency symbols in monetary values.

See Also

UInt16 Structure | UInt16 Members | System Namespace | UInt16.Format Overload List | String | NumberStyles