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.

傳回

nfi 的唯讀 NumberFormatInfo 包裝函式。A read-only NumberFormatInfo wrapper around nfi.

例外狀況

nfinullnfi is null.

備註

此包裝函式可防止nfi對的任何修改。This wrapper prevents any modifications to nfi.

嘗試對唯讀NumberFormatInfo的屬性執行指派InvalidOperationException會造成。Attempting to perform an assignment to a property of a read-only NumberFormatInfo causes an InvalidOperationException.

適用於

另請參閱