CultureNotFoundException 建構函式

定義

初始化 CultureNotFoundException 類別的新執行個體。

多載

CultureNotFoundException()

使用將其訊息字串設定為系統提供的訊息,初始化 CultureNotFoundException 類別的新執行個體。

CultureNotFoundException(String)

使用指定的錯誤訊息,初始化 CultureNotFoundException 類別的新執行個體。

CultureNotFoundException(SerializationInfo, StreamingContext)
已淘汰.

使用指定的序列化資料和內容,初始化 CultureNotFoundException 類別的新執行個體。

CultureNotFoundException(String, Exception)

使用指定的錯誤訊息以及造成此例外狀況的內部例外狀況的參考,初始化 CultureNotFoundException 類別的新執行個體。

CultureNotFoundException(String, String)

使用指定的錯誤訊息和造成這個例外狀況的參數名稱,初始化 CultureNotFoundException 類別的新執行個體。

CultureNotFoundException(String, Int32, Exception)

使用指定的錯誤訊息、無效的文化特性 ID 和造成這個例外狀況的內部例外狀況的參考,初始化 CultureNotFoundException 類別的新執行個體。

CultureNotFoundException(String, Int32, String)

使用指定的錯誤訊息、無效的文化特性 ID 和造成這個例外狀況的參數名稱,初始化 CultureNotFoundException 類別的新執行個體。

CultureNotFoundException(String, String, Exception)

使用指定的錯誤訊息、無效的文化特性名稱和造成這個例外狀況的內部例外狀況的參考,初始化 CultureNotFoundException 類別的新執行個體。

CultureNotFoundException(String, String, String)

使用指定的錯誤訊息、無效的文化特性名稱和造成這個例外狀況的參數名稱,初始化 CultureNotFoundException 類別的新執行個體。

備註

CultureNotFoundException 會使用 HRESULT COR_E_ARGUMENT,其值為 0x80070057。

CultureNotFoundException()

來源:
CultureNotFoundException.cs
來源:
CultureNotFoundException.cs
來源:
CultureNotFoundException.cs

使用將其訊息字串設定為系統提供的訊息,初始化 CultureNotFoundException 類別的新執行個體。

public:
 CultureNotFoundException();
public CultureNotFoundException ();
Public Sub New ()

備註

CultureNotFoundException 會使用 HRESULT COR_E_ARGUMENT,其值為 0x80070057。

適用於

CultureNotFoundException(String)

來源:
CultureNotFoundException.cs
來源:
CultureNotFoundException.cs
來源:
CultureNotFoundException.cs

使用指定的錯誤訊息,初始化 CultureNotFoundException 類別的新執行個體。

public:
 CultureNotFoundException(System::String ^ message);
public CultureNotFoundException (string message);
public CultureNotFoundException (string? message);
new System.Globalization.CultureNotFoundException : string -> System.Globalization.CultureNotFoundException
Public Sub New (message As String)

參數

message
String

與這個例外狀況一起顯示的錯誤訊息。

備註

這個建構函式會使用 參數的值,初始化 Message 新實例的 message 屬性。 message 參數的內容必須能讓人了解。 需要此建構函式的呼叫者,才能確保此字串已針對目前的系統文化特性進行當地語系化。

CultureNotFoundException 會使用 HRESULT COR_E_ARGUMENT,其值為 0x80070057。

適用於

CultureNotFoundException(SerializationInfo, StreamingContext)

來源:
CultureNotFoundException.cs
來源:
CultureNotFoundException.cs
來源:
CultureNotFoundException.cs

警告

This API supports obsolete formatter-based serialization. It should not be called or extended by application code.

使用指定的序列化資料和內容,初始化 CultureNotFoundException 類別的新執行個體。

protected:
 CultureNotFoundException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected CultureNotFoundException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
protected CultureNotFoundException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Globalization.CultureNotFoundException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Globalization.CultureNotFoundException
[<System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Globalization.CultureNotFoundException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Globalization.CultureNotFoundException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

參數

info
SerializationInfo

存放序列物件資料的物件。

context
StreamingContext

關於來源或目的端的內容資訊。

屬性

備註

這個建構函式是在還原序列化期間呼叫,以便重新組成透過資料流傳輸的例外狀況物件。

適用於

CultureNotFoundException(String, Exception)

來源:
CultureNotFoundException.cs
來源:
CultureNotFoundException.cs
來源:
CultureNotFoundException.cs

使用指定的錯誤訊息以及造成此例外狀況的內部例外狀況的參考,初始化 CultureNotFoundException 類別的新執行個體。

public:
 CultureNotFoundException(System::String ^ message, Exception ^ innerException);
public CultureNotFoundException (string message, Exception innerException);
public CultureNotFoundException (string? message, Exception? innerException);
new System.Globalization.CultureNotFoundException : string * Exception -> System.Globalization.CultureNotFoundException
Public Sub New (message As String, innerException As Exception)

參數

message
String

與這個例外狀況一起顯示的錯誤訊息。

innerException
Exception

做為目前例外狀況發生原因的例外狀況。 如果 innerException 參數不是 null 參考,目前的例外狀況會在處理內部例外的 catch 區塊中引發。

備註

這個建構函式會使用 參數的值,初始化 Message 新實例的 message 屬性。 message 參數的內容必須能讓人了解。 需要此建構函式的呼叫者,才能確保此字串已針對目前的系統文化特性進行當地語系化。

被擲回以做為前一個例外狀況直接結果的例外狀況,應該在 InnerException 屬性中包含對前一個例外狀況的參考。 InnerException 屬性傳回的值會與傳入建構函式的值相同,或傳回 null (如果 InnerException 屬性未提供內部例外狀況值給建構函式)。

適用於

CultureNotFoundException(String, String)

來源:
CultureNotFoundException.cs
來源:
CultureNotFoundException.cs
來源:
CultureNotFoundException.cs

使用指定的錯誤訊息和造成這個例外狀況的參數名稱,初始化 CultureNotFoundException 類別的新執行個體。

public:
 CultureNotFoundException(System::String ^ paramName, System::String ^ message);
public CultureNotFoundException (string paramName, string message);
public CultureNotFoundException (string? paramName, string? message);
new System.Globalization.CultureNotFoundException : string * string -> System.Globalization.CultureNotFoundException
Public Sub New (paramName As String, message As String)

參數

paramName
String

造成目前例外狀況的參數名稱。

message
String

與這個例外狀況一起顯示的錯誤訊息。

備註

這個建構函式會使用 參數的值,初始化 Message 新實例的 message 屬性。 message 參數的內容必須能讓人了解。 需要此建構函式的呼叫者,才能確保此字串已針對目前的系統文化特性進行當地語系化。

這個建構函式會使用 paramName初始化ParamName新實例的 屬性。 paramName 的內容必須能讓人了解。

CultureNotFoundException 會使用 HRESULT COR_E_ARGUMENT,其值為 0x80070057。

適用於

CultureNotFoundException(String, Int32, Exception)

來源:
CultureNotFoundException.cs
來源:
CultureNotFoundException.cs
來源:
CultureNotFoundException.cs

使用指定的錯誤訊息、無效的文化特性 ID 和造成這個例外狀況的內部例外狀況的參考,初始化 CultureNotFoundException 類別的新執行個體。

public:
 CultureNotFoundException(System::String ^ message, int invalidCultureId, Exception ^ innerException);
public CultureNotFoundException (string? message, int invalidCultureId, Exception? innerException);
public CultureNotFoundException (string message, int invalidCultureId, Exception innerException);
new System.Globalization.CultureNotFoundException : string * int * Exception -> System.Globalization.CultureNotFoundException
Public Sub New (message As String, invalidCultureId As Integer, innerException As Exception)

參數

message
String

與這個例外狀況一起顯示的錯誤訊息。

invalidCultureId
Int32

找不到的文化特性 ID。

innerException
Exception

做為目前例外狀況發生原因的例外狀況。 如果 innerException 參數不是 null 參考,目前的例外狀況會在處理內部例外的 catch 區塊中引發。

備註

這個建構函式會使用 參數的值,初始化 Message 新實例的 message 屬性。 message 參數的內容必須能讓人了解。 需要此建構函式的呼叫者,才能確保此字串已針對目前的系統文化特性進行當地語系化。

InnerException 屬性。 InnerException 屬性傳回的值會與傳入建構函式的值相同,或傳回 null (如果 InnerException 屬性未提供內部例外狀況值給建構函式)。

適用於

CultureNotFoundException(String, Int32, String)

來源:
CultureNotFoundException.cs
來源:
CultureNotFoundException.cs
來源:
CultureNotFoundException.cs

使用指定的錯誤訊息、無效的文化特性 ID 和造成這個例外狀況的參數名稱,初始化 CultureNotFoundException 類別的新執行個體。

public:
 CultureNotFoundException(System::String ^ paramName, int invalidCultureId, System::String ^ message);
public CultureNotFoundException (string? paramName, int invalidCultureId, string? message);
public CultureNotFoundException (string paramName, int invalidCultureId, string message);
new System.Globalization.CultureNotFoundException : string * int * string -> System.Globalization.CultureNotFoundException
Public Sub New (paramName As String, invalidCultureId As Integer, message As String)

參數

paramName
String

造成目前例外狀況的參數名稱。

invalidCultureId
Int32

找不到的文化特性 ID。

message
String

與這個例外狀況一起顯示的錯誤訊息。

備註

這個建構函式會使用 參數的值,初始化 Message 新實例的 message 屬性。 message 參數的內容必須能讓人了解。 需要此建構函式的呼叫者,才能確保此字串已針對目前的系統文化特性進行當地語系化。

這個建構函式會使用 paramName初始化ParamName新實例的 屬性。 paramName 的內容必須能讓人了解。

CultureNotFoundException 會使用 HRESULT COR_E_ARGUMENT,其值為 0x80070057。

適用於

CultureNotFoundException(String, String, Exception)

來源:
CultureNotFoundException.cs
來源:
CultureNotFoundException.cs
來源:
CultureNotFoundException.cs

使用指定的錯誤訊息、無效的文化特性名稱和造成這個例外狀況的內部例外狀況的參考,初始化 CultureNotFoundException 類別的新執行個體。

public:
 CultureNotFoundException(System::String ^ message, System::String ^ invalidCultureName, Exception ^ innerException);
public CultureNotFoundException (string message, string invalidCultureName, Exception innerException);
public CultureNotFoundException (string? message, string? invalidCultureName, Exception? innerException);
new System.Globalization.CultureNotFoundException : string * string * Exception -> System.Globalization.CultureNotFoundException
Public Sub New (message As String, invalidCultureName As String, innerException As Exception)

參數

message
String

與這個例外狀況一起顯示的錯誤訊息。

invalidCultureName
String

找不到的文化特性名稱。

innerException
Exception

做為目前例外狀況發生原因的例外狀況。 如果 innerException 參數不是 null 參考,目前的例外狀況會在處理內部例外的 catch 區塊中引發。

備註

這個建構函式會使用 參數的值,初始化 Message 新實例的 message 屬性。 message 參數的內容必須能讓人了解。 需要此建構函式的呼叫者,才能確保此字串已針對目前的系統文化特性進行當地語系化。

InnerException 屬性。 InnerException 屬性傳回的值會與傳入建構函式的值相同,或傳回 null (如果 InnerException 屬性未提供內部例外狀況值給建構函式)。

適用於

CultureNotFoundException(String, String, String)

來源:
CultureNotFoundException.cs
來源:
CultureNotFoundException.cs
來源:
CultureNotFoundException.cs

使用指定的錯誤訊息、無效的文化特性名稱和造成這個例外狀況的參數名稱,初始化 CultureNotFoundException 類別的新執行個體。

public:
 CultureNotFoundException(System::String ^ paramName, System::String ^ invalidCultureName, System::String ^ message);
public CultureNotFoundException (string paramName, string invalidCultureName, string message);
public CultureNotFoundException (string? paramName, string? invalidCultureName, string? message);
new System.Globalization.CultureNotFoundException : string * string * string -> System.Globalization.CultureNotFoundException
Public Sub New (paramName As String, invalidCultureName As String, message As String)

參數

paramName
String

造成目前例外狀況的參數名稱。

invalidCultureName
String

找不到的文化特性名稱。

message
String

與這個例外狀況一起顯示的錯誤訊息。

備註

這個建構函式會使用 參數的值,初始化 Message 新實例的 message 屬性。 message 參數的內容必須能讓人了解。 需要此建構函式的呼叫者,才能確保此字串已針對目前的系統文化特性進行當地語系化。

這個建構函式會使用 paramName初始化ParamName新實例的 屬性。 paramName 的內容必須能讓人了解。

CultureNotFoundException 會使用 HRESULT COR_E_ARGUMENT,其值為 0x80070057。

適用於