NumberFormatInfo.GetFormat(Type) 方法
定義
取得指定類型的物件,以提供數字格式化服務。Gets an object of the specified type that provides a number formatting service.
public:
virtual System::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
與目前 NumberFormatInfo 的類型相同,則為目前的 NumberFormatInfo,否則為 null
。The current NumberFormatInfo, if formatType
is the same as the type of the current NumberFormatInfo; otherwise, null
.
實作
備註
當Format(String, IFormatProvider)
目前NumberFormatInfo的做為IFormatProvider參數傳遞時,基底資料類型所支援的方法會叫用這個方法。The Format(String, IFormatProvider)
methods supported by the base data types invoke this method when the current NumberFormatInfo is passed as the IFormatProvider parameter. 這個方法會實作 IFormatProvider.GetFormat。This method implements IFormatProvider.GetFormat.