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);
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.