NumberFormatAttribute 构造函数 (String, Nullable<Int32>, Nullable<Double>, array<KeyAttributePair<NumberFormatAttribute> )
使用指定的格式字符串、精度、小数位数和 KeyAttributePair<T> 实例初始化 NumberFormatAttribute 类的新实例。
命名空间: Microsoft.Windows.Design.PropertyEditing
程序集: Microsoft.Windows.Design.Interaction(在 Microsoft.Windows.Design.Interaction.dll 中)
语法
声明
Public Sub New ( _
formatString As String, _
maxPrecision As Nullable(Of Integer), _
scale As Nullable(Of Double), _
mapArray As KeyAttributePair(Of NumberFormatAttribute)() _
)
public NumberFormatAttribute(
string formatString,
Nullable<int> maxPrecision,
Nullable<double> scale,
KeyAttributePair<NumberFormatAttribute>[] mapArray
)
public:
NumberFormatAttribute(
String^ formatString,
Nullable<int> maxPrecision,
Nullable<double> scale,
array<KeyAttributePair<NumberFormatAttribute^>>^ mapArray
)
new :
formatString:string *
maxPrecision:Nullable<int> *
scale:Nullable<float> *
mapArray:KeyAttributePair<NumberFormatAttribute>[] -> NumberFormatAttribute
public function NumberFormatAttribute(
formatString : String,
maxPrecision : Nullable<int>,
scale : Nullable<double>,
mapArray : KeyAttributePair<NumberFormatAttribute>[]
)
参数
- formatString
类型:System.String
一个数字格式字符串。
- maxPrecision
类型:System.Nullable<Int32>
一个整数,表示数字编辑器可处理的最大小数位数。
- scale
类型:System.Nullable<Double>
应用于数字显示值的小数位数。
- mapArray
类型:array<Microsoft.Windows.Design.PropertyEditing.KeyAttributePair<NumberFormatAttribute>[]
一个 KeyAttributePair<T> 实例数组。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。