NumberFormatInfo.ReadOnly(NumberFormatInfo) 方法

定义

返回只读的 NumberFormatInfo 包装。Returns a read-only NumberFormatInfo wrapper.

public:
 static System::Globalization::NumberFormatInfo ^ ReadOnly(System::Globalization::NumberFormatInfo ^ nfi);
public static System.Globalization.NumberFormatInfo ReadOnly (System.Globalization.NumberFormatInfo nfi);
static member ReadOnly : System.Globalization.NumberFormatInfo -> System.Globalization.NumberFormatInfo
Public Shared Function ReadOnly (nfi As NumberFormatInfo) As NumberFormatInfo

参数

nfi
NumberFormatInfo

要包装的 NumberFormatInfoThe NumberFormatInfo to wrap.

返回

NumberFormatInfo 周围的只读 nfi 包装。A read-only NumberFormatInfo wrapper around nfi.

异常

nfinullnfi is null.

注解

此包装器可防止对 nfi的任何修改。This wrapper prevents any modifications to nfi.

尝试对只读 NumberFormatInfo 的属性执行赋值将导致 InvalidOperationExceptionAttempting to perform an assignment to a property of a read-only NumberFormatInfo causes an InvalidOperationException.

适用于

另请参阅