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!

Decimal.Format (Decimal, String, NumberFormatInfo)

Converts a numeric value to a String with the specified format string.

[Visual Basic]
Overloads Public Shared Function Format( _
   ByVal value As Decimal, _
   ByVal format As String, _
   ByVal info As NumberFormatInfo _
) As String
[C#]
public static string Format(
   Decimal value,
   string format,
   NumberFormatInfo info
);
[C++]
public: static String* Format(
   Decimal value,
   String* format,
   NumberFormatInfo* info
);
[JScript]
public static function Format(
   value : Decimal,
   format : String,
   info : NumberFormatInfo
) : String;

Parameters

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

Return Value

The String representation of the Decimal in the specified format.

Remarks

If format is null or an empty string, value is formatted as if the string general ("G") format were specified.

If info is null, the numeric format information is obtained from the current locale.

The info parameter specifies the NumberFormatInfo instance used to format the number. 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.

(For additional information on currency symbols and current cultures, see CultureInfo.)

See Also

Decimal Structure | Decimal Members | System Namespace | Decimal.Format Overload List