ArgumentOutOfRangeException Konstruktory
Definicja
Inicjuje nowe wystąpienie klasy ArgumentOutOfRangeException.Initializes a new instance of the ArgumentOutOfRangeException class.
Przeciążenia
ArgumentOutOfRangeException() |
Inicjuje nowe wystąpienie klasy ArgumentOutOfRangeException.Initializes a new instance of the ArgumentOutOfRangeException class. |
ArgumentOutOfRangeException(String) |
Inicjuje nowe wystąpienie ArgumentOutOfRangeException klasy z nazwą parametru powodującego ten wyjątek.Initializes a new instance of the ArgumentOutOfRangeException class with the name of the parameter that causes this exception. |
ArgumentOutOfRangeException(SerializationInfo, StreamingContext) |
Inicjuje nowe wystąpienie klasy ArgumentOutOfRangeException z zserializowanymi danymi.Initializes a new instance of the ArgumentOutOfRangeException class with serialized data. |
ArgumentOutOfRangeException(String, Exception) |
Inicjuje nowe wystąpienie ArgumentOutOfRangeException klasy z określonym komunikatem o błędzie i wyjątkiem, który jest przyczyną tego wyjątku.Initializes a new instance of the ArgumentOutOfRangeException class with a specified error message and the exception that is the cause of this exception. |
ArgumentOutOfRangeException(String, String) |
Inicjuje nowe wystąpienie ArgumentOutOfRangeException klasy z nazwą parametru powodującego ten wyjątek i określony komunikat o błędzie.Initializes a new instance of the ArgumentOutOfRangeException class with the name of the parameter that causes this exception and a specified error message. |
ArgumentOutOfRangeException(String, Object, String) |
Inicjuje nowe wystąpienie ArgumentOutOfRangeException klasy z nazwą parametru, wartością argumentu i określonym komunikatem o błędzie.Initializes a new instance of the ArgumentOutOfRangeException class with the parameter name, the value of the argument, and a specified error message. |
ArgumentOutOfRangeException()
Inicjuje nowe wystąpienie klasy ArgumentOutOfRangeException.Initializes a new instance of the ArgumentOutOfRangeException class.
public:
ArgumentOutOfRangeException();
public ArgumentOutOfRangeException ();
Public Sub New ()
Uwagi
Ten konstruktor inicjuje Message Właściwość nowego wystąpienia z komunikatem dostarczonym przez system, który opisuje błąd, na przykład "nieujemna liczba jest wymagana".This constructor initializes the Message property of the new instance to a system-supplied message that describes the error, such as "Nonnegative number required." W przypadku tego komunikatu brane są pod uwagę bieżące ustawienia kulturowe systemu.This message takes into account the current system culture.
Poniższa tabela prezentuje początkowe wartości właściwości dla wystąpienia klasy ArgumentOutOfRangeException.The following table shows the initial property values for an instance of ArgumentOutOfRangeException.
WłaściwośćProperty | WartośćValue |
---|---|
InnerException | Odwołanie o wartości null ( Nothing w Visual Basic).A null reference (Nothing in Visual Basic). |
Message | Zlokalizowany ciąg z komunikatem o błędzie.The localized error message string. |
Dotyczy
ArgumentOutOfRangeException(String)
Inicjuje nowe wystąpienie ArgumentOutOfRangeException klasy z nazwą parametru powodującego ten wyjątek.Initializes a new instance of the ArgumentOutOfRangeException class with the name of the parameter that causes this exception.
public:
ArgumentOutOfRangeException(System::String ^ paramName);
public ArgumentOutOfRangeException (string paramName);
new ArgumentOutOfRangeException : string -> ArgumentOutOfRangeException
Public Sub New (paramName As String)
Parametry
- paramName
- String
Nazwa parametru, który powoduje ten wyjątek.The name of the parameter that causes this exception.
Uwagi
Ten konstruktor inicjuje Message Właściwość nowego wystąpienia z komunikatem dostarczonym przez system, który opisuje błąd, na przykład "nieujemna liczba jest wymagana".This constructor initializes the Message property of the new instance to a system-supplied message that describes the error, such as "Nonnegative number required." W przypadku tego komunikatu brane są pod uwagę bieżące ustawienia kulturowe systemu.This message takes into account the current system culture.
Ten konstruktor inicjuje ParamName Właściwość nowego wystąpienia przy użyciu paramName
parametru.This constructor initializes the ParamName property of the new instance using the paramName
parameter. Zawartość paramName
ma być zrozumiała dla ludzi.The content of paramName
is intended to be understood by humans.
Poniższa tabela prezentuje początkowe wartości właściwości dla wystąpienia klasy ArgumentOutOfRangeException.The following table shows the initial property values for an instance of ArgumentOutOfRangeException.
WłaściwośćProperty | WartośćValue |
---|---|
InnerException | Odwołanie o wartości null ( Nothing w Visual Basic).A null reference (Nothing in Visual Basic). |
Message | Pusty ciąg ("").The empty string (""). |
ParamName | Ciąg nazwy parametru.The parameter name string. |
Dotyczy
ArgumentOutOfRangeException(SerializationInfo, StreamingContext)
Inicjuje nowe wystąpienie klasy ArgumentOutOfRangeException z zserializowanymi danymi.Initializes a new instance of the ArgumentOutOfRangeException class with serialized data.
protected:
ArgumentOutOfRangeException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected ArgumentOutOfRangeException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new ArgumentOutOfRangeException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> ArgumentOutOfRangeException
Protected Sub New (info As SerializationInfo, context As StreamingContext)
Parametry
- info
- SerializationInfo
Obiekt zawierający dane serializowanego obiektu.The object that holds the serialized object data.
- context
- StreamingContext
Obiekt, który opisuje Źródło lub miejsce docelowe serializowanych danych.An object that describes the source or destination of the serialized data.
Uwagi
Ten konstruktor jest wywoływana podczas deserializacji do odtworzenia obiektu wyjątku przesyłanego za pomocą strumienia.This constructor is called during deserialization to reconstitute the exception object transmitted over a stream. Aby uzyskać więcej informacji, zobacz XML i Serializacja protokołu SOAP.For more information, see XML and SOAP Serialization.
Zobacz też
Dotyczy
ArgumentOutOfRangeException(String, Exception)
Inicjuje nowe wystąpienie ArgumentOutOfRangeException klasy z określonym komunikatem o błędzie i wyjątkiem, który jest przyczyną tego wyjątku.Initializes a new instance of the ArgumentOutOfRangeException class with a specified error message and the exception that is the cause of this exception.
public:
ArgumentOutOfRangeException(System::String ^ message, Exception ^ innerException);
public ArgumentOutOfRangeException (string message, Exception innerException);
new ArgumentOutOfRangeException : string * Exception -> ArgumentOutOfRangeException
Public Sub New (message As String, innerException As Exception)
Parametry
- message
- String
Komunikat o błędzie, który objaśnia przyczynę tego wyjątku.The error message that explains the reason for this exception.
- innerException
- Exception
Wyjątek, który jest przyczyną bieżącego wyjątku lub odwołaniem null ( Nothing
w Visual Basic), jeśli nie określono wyjątku wewnętrznego.The exception that is the cause of the current exception, or a null reference (Nothing
in Visual Basic) if no inner exception is specified.
Dotyczy
ArgumentOutOfRangeException(String, String)
Inicjuje nowe wystąpienie ArgumentOutOfRangeException klasy z nazwą parametru powodującego ten wyjątek i określony komunikat o błędzie.Initializes a new instance of the ArgumentOutOfRangeException class with the name of the parameter that causes this exception and a specified error message.
public:
ArgumentOutOfRangeException(System::String ^ paramName, System::String ^ message);
public ArgumentOutOfRangeException (string paramName, string message);
new ArgumentOutOfRangeException : string * string -> ArgumentOutOfRangeException
Public Sub New (paramName As String, message As String)
Parametry
- paramName
- String
Nazwa parametru, który spowodował wyjątek.The name of the parameter that caused the exception.
- message
- String
Komunikat z opisem błędu.The message that describes the error.
Uwagi
Ten konstruktor inicjuje Message Właściwość nowego wystąpienia przy użyciu wartości message
parametru.This constructor initializes the Message property of the new instance using the value of the message
parameter. Zawartość message
parametru ma być zrozumiała dla ludzi.The content of the message
parameter is intended to be understood by humans. Obiekt wywołujący tego konstruktora jest wymagany w celu zagwarantowania, że ten ciąg został zlokalizowany w bieżącej kulturze systemu.The caller of this constructor is required to ensure that this string has been localized for the current system culture.
Ten konstruktor inicjuje ParamName Właściwość nowego wystąpienia przy użyciu paramName
parametru.This constructor initializes the ParamName property of the new instance using the paramName
parameter. Zawartość paramName
ma być zrozumiała dla ludzi.The content of paramName
is intended to be understood by humans.
Poniższa tabela prezentuje początkowe wartości właściwości dla wystąpienia klasy ArgumentOutOfRangeException.The following table shows the initial property values for an instance of ArgumentOutOfRangeException.
WłaściwośćProperty | WartośćValue |
---|---|
InnerException | null .null . |
Message | Ciąg komunikatu o błędzie.The error message string. |
ParamName | Ciąg nazwy parametru.The parameter name string. |
Dotyczy
ArgumentOutOfRangeException(String, Object, String)
Inicjuje nowe wystąpienie ArgumentOutOfRangeException klasy z nazwą parametru, wartością argumentu i określonym komunikatem o błędzie.Initializes a new instance of the ArgumentOutOfRangeException class with the parameter name, the value of the argument, and a specified error message.
public:
ArgumentOutOfRangeException(System::String ^ paramName, System::Object ^ actualValue, System::String ^ message);
public ArgumentOutOfRangeException (string paramName, object actualValue, string message);
new ArgumentOutOfRangeException : string * obj * string -> ArgumentOutOfRangeException
Public Sub New (paramName As String, actualValue As Object, message As String)
Parametry
- paramName
- String
Nazwa parametru, który spowodował wyjątek.The name of the parameter that caused the exception.
- actualValue
- Object
Wartość argumentu, który powoduje ten wyjątek.The value of the argument that causes this exception.
- message
- String
Komunikat z opisem błędu.The message that describes the error.
Uwagi
Ten konstruktor inicjuje ParamName Właściwość nowego wystąpienia przy użyciu paramName
parametru, ActualValue właściwości przy użyciu actualValue
parametru i Message właściwości przy użyciu message
parametru.This constructor initializes the ParamName property of the new instance using the paramName
parameter, the ActualValue property using the actualValue
parameter, and the Message property using the message
parameter. Zawartość paramName
message
parametrów i ma być zrozumiała dla ludzi.The content of the paramName
and message
parameters is intended to be understood by humans. Obiekt wywołujący tego konstruktora jest wymagany, aby upewnić się, że te ciągi zostały zlokalizowane dla bieżącej kultury systemowej.The caller of this constructor is required to ensure that these strings have been localized for the current system culture.
actualValue
Parametr nie jest używany w bibliotece klas .NET.The actualValue
parameter is not used within the .NET class library. Aplikacje mogą jednak używać właściwości, ActualValue Aby uzyskać dostępną wartość argumentu.However, apps can use the ActualValue property to obtain the available argument value.
actualValue
Parametr zawiera nieprawidłową wartość, która została przeniesiona do metody i spowodowała wystąpienie tego wyjątku.The actualValue
parameter contains the invalid value that was passed to the method and caused this exception to be thrown. Ta wartość jest przechowywana we ActualValue właściwości i jej reprezentacja w postaci ciągu jest dołączana do ciągu komunikatu przechowywanego we Message właściwości.This value is stored in the ActualValue property and its string representation is appended to the message string held in the Message property.
Poniższa tabela prezentuje początkowe wartości właściwości dla wystąpienia klasy ArgumentOutOfRangeException.The following table shows the initial property values for an instance of ArgumentOutOfRangeException.
WłaściwośćProperty | WartośćValue |
---|---|
ActualValue | Wartość argumentu.The argument value. |
InnerException | Odwołanie o wartości null ( Nothing w Visual Basic).The null reference (Nothing in Visual Basic). |
Message | Ciąg komunikatu o błędzie.The error message string. |
ParamName | Ciąg nazwy parametru.The parameter name string. |