संपादित करें

इसके माध्यम से साझा किया गया


CultureNotFoundException Constructors

Definition

Initializes a new instance of the CultureNotFoundException class.

Overloads

CultureNotFoundException()

Initializes a new instance of the CultureNotFoundException class with its message string set to a system-supplied message.

CultureNotFoundException(String)

Initializes a new instance of the CultureNotFoundException class with the specified error message.

CultureNotFoundException(SerializationInfo, StreamingContext)
Obsolete.

Initializes a new instance of the CultureNotFoundException class using the specified serialization data and context.

CultureNotFoundException(String, Exception)

Initializes a new instance of the CultureNotFoundException class with a specified error message and a reference to the inner exception that is the cause of this exception.

CultureNotFoundException(String, String)

Initializes a new instance of the CultureNotFoundException class with a specified error message and the name of the parameter that is the cause this exception.

CultureNotFoundException(String, Int32, Exception)

Initializes a new instance of the CultureNotFoundException class with a specified error message, the invalid Culture ID, and a reference to the inner exception that is the cause of this exception.

CultureNotFoundException(String, Int32, String)

Initializes a new instance of the CultureNotFoundException class with a specified error message, the invalid Culture ID, and the name of the parameter that is the cause this exception.

CultureNotFoundException(String, String, Exception)

Initializes a new instance of the CultureNotFoundException class with a specified error message, the invalid Culture Name, and a reference to the inner exception that is the cause of this exception.

CultureNotFoundException(String, String, String)

Initializes a new instance of the CultureNotFoundException class with a specified error message, the invalid Culture Name, and the name of the parameter that is the cause this exception.

Remarks

CultureNotFoundException uses the HRESULT COR_E_ARGUMENT, which has the value 0x80070057.

CultureNotFoundException()

Source:
CultureNotFoundException.cs
Source:
CultureNotFoundException.cs
Source:
CultureNotFoundException.cs

Initializes a new instance of the CultureNotFoundException class with its message string set to a system-supplied message.

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

Remarks

CultureNotFoundException uses the HRESULT COR_E_ARGUMENT, which has the value 0x80070057.

Applies to

CultureNotFoundException(String)

Source:
CultureNotFoundException.cs
Source:
CultureNotFoundException.cs
Source:
CultureNotFoundException.cs

Initializes a new instance of the CultureNotFoundException class with the specified error message.

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)

Parameters

message
String

The error message to display with this exception.

Remarks

This constructor initializes the Message property of the new instance using the value of the message parameter. The content of the message parameter is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

CultureNotFoundException uses the HRESULT COR_E_ARGUMENT, which has the value 0x80070057.

Applies to

CultureNotFoundException(SerializationInfo, StreamingContext)

Source:
CultureNotFoundException.cs
Source:
CultureNotFoundException.cs
Source:
CultureNotFoundException.cs

Caution

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

Initializes a new instance of the CultureNotFoundException class using the specified serialization data and context.

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)

Parameters

info
SerializationInfo

The object that holds the serialized object data.

context
StreamingContext

The contextual information about the source or destination.

Attributes

Remarks

This constructor is called during deserialization to reconstitute the exception object transmitted over a stream.

Applies to

CultureNotFoundException(String, Exception)

Source:
CultureNotFoundException.cs
Source:
CultureNotFoundException.cs
Source:
CultureNotFoundException.cs

Initializes a new instance of the CultureNotFoundException class with a specified error message and a reference to the inner exception that is the cause of this exception.

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)

Parameters

message
String

The error message to display with this exception.

innerException
Exception

The exception that is the cause of the current exception. If the innerException parameter is not a null reference, the current exception is raised in a catch block that handles the inner exception.

Remarks

This constructor initializes the Message property of the new instance using the value of the message parameter. The content of the message parameter is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the InnerException property. The InnerException property returns the same value that is passed into the constructor, or null if the InnerException property does not supply the inner exception value to the constructor.

Applies to

CultureNotFoundException(String, String)

Source:
CultureNotFoundException.cs
Source:
CultureNotFoundException.cs
Source:
CultureNotFoundException.cs

Initializes a new instance of the CultureNotFoundException class with a specified error message and the name of the parameter that is the cause this exception.

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)

Parameters

paramName
String

The name of the parameter that is the cause of the current exception.

message
String

The error message to display with this exception.

Remarks

This constructor initializes the Message property of the new instance using the value of the message parameter. The content of the message parameter is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

This constructor initializes the ParamName property of the new instance using paramName. The content of paramName is intended to be understood by humans.

CultureNotFoundException uses the HRESULT COR_E_ARGUMENT, which has the value 0x80070057.

Applies to

CultureNotFoundException(String, Int32, Exception)

Source:
CultureNotFoundException.cs
Source:
CultureNotFoundException.cs
Source:
CultureNotFoundException.cs

Initializes a new instance of the CultureNotFoundException class with a specified error message, the invalid Culture ID, and a reference to the inner exception that is the cause of this exception.

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)

Parameters

message
String

The error message to display with this exception.

invalidCultureId
Int32

The Culture ID that cannot be found.

innerException
Exception

The exception that is the cause of the current exception. If the innerException parameter is not a null reference, the current exception is raised in a catch block that handles the inner exception.

Remarks

This constructor initializes the Message property of the new instance using the value of the message parameter. The content of the message parameter is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

InnerException property. The InnerException property returns the same value that is passed into the constructor, or null if the InnerException property does not supply the inner exception value to the constructor.

Applies to

CultureNotFoundException(String, Int32, String)

Source:
CultureNotFoundException.cs
Source:
CultureNotFoundException.cs
Source:
CultureNotFoundException.cs

Initializes a new instance of the CultureNotFoundException class with a specified error message, the invalid Culture ID, and the name of the parameter that is the cause this exception.

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)

Parameters

paramName
String

The name of the parameter that is the cause the current exception.

invalidCultureId
Int32

The Culture ID that cannot be found.

message
String

The error message to display with this exception.

Remarks

This constructor initializes the Message property of the new instance using the value of the message parameter. The content of the message parameter is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

This constructor initializes the ParamName property of the new instance using paramName. The content of paramName is intended to be understood by humans.

CultureNotFoundException uses the HRESULT COR_E_ARGUMENT, which has the value 0x80070057.

Applies to

CultureNotFoundException(String, String, Exception)

Source:
CultureNotFoundException.cs
Source:
CultureNotFoundException.cs
Source:
CultureNotFoundException.cs

Initializes a new instance of the CultureNotFoundException class with a specified error message, the invalid Culture Name, and a reference to the inner exception that is the cause of this exception.

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)

Parameters

message
String

The error message to display with this exception.

invalidCultureName
String

The Culture Name that cannot be found.

innerException
Exception

The exception that is the cause of the current exception. If the innerException parameter is not a null reference, the current exception is raised in a catch block that handles the inner exception.

Remarks

This constructor initializes the Message property of the new instance using the value of the message parameter. The content of the message parameter is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

InnerException property. The InnerException property returns the same value that is passed into the constructor, or null if the InnerException property does not supply the inner exception value to the constructor.

Applies to

CultureNotFoundException(String, String, String)

Source:
CultureNotFoundException.cs
Source:
CultureNotFoundException.cs
Source:
CultureNotFoundException.cs

Initializes a new instance of the CultureNotFoundException class with a specified error message, the invalid Culture Name, and the name of the parameter that is the cause this exception.

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)

Parameters

paramName
String

The name of the parameter that is the cause the current exception.

invalidCultureName
String

The Culture Name that cannot be found.

message
String

The error message to display with this exception.

Remarks

This constructor initializes the Message property of the new instance using the value of the message parameter. The content of the message parameter is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

This constructor initializes the ParamName property of the new instance using paramName. The content of paramName is intended to be understood by humans.

CultureNotFoundException uses the HRESULT COR_E_ARGUMENT, which has the value 0x80070057.

Applies to