NumberFormatInfo.GetFormat(Type) 方法

定義

取得指定類型的物件,以提供數字格式化服務。

public:
 virtual System::Object ^ GetFormat(Type ^ formatType);
public object GetFormat (Type formatType);
public object? GetFormat (Type? formatType);
abstract member GetFormat : Type -> obj
override this.GetFormat : Type -> obj
Public Function GetFormat (formatType As Type) As Object

參數

formatType
Type

必要格式服務的 Type

傳回

如果 formatType 與目前 NumberFormatInfo 的類型相同,則為目前的 NumberFormatInfo,否則為 null

實作

備註

Format(String, IFormatProvider) 底資料類型所支援的方法會在傳遞目前 NumberFormatInfo 做為 IFormatProvider 參數時叫用這個方法。 這個方法會實作 IFormatProvider.GetFormat

適用於

另請參閱