NumberFormatInfo.GetFormat Method

Definition

Gets an object of the specified type that provides a number formatting service.

public object GetFormat (Type formatType);
Parameters
formatType
Type

The Type of the required formatting service.

Returns

The current NumberFormatInfo, if formatType is the same as the type of the current NumberFormatInfo; otherwise, null.

Remarks

The Format(String, IFormatProvider) methods supported by the base data types invoke this method when the current NumberFormatInfo is passed as the IFormatProvider parameter. This method implements IFormatProvider.GetFormat.