TargetParameterCountException Construtores
Definição
Inicializa uma nova instância da classe TargetParameterCountException.Initializes a new instance of the TargetParameterCountException class.
Sobrecargas
| TargetParameterCountException() |
Inicializa uma nova instância da classe TargetParameterCountException com uma cadeia de caracteres de mensagem vazia e a causa raiz da exceção.Initializes a new instance of the TargetParameterCountException class with an empty message string and the root cause of the exception. |
| TargetParameterCountException(String) |
Inicializa uma nova instância da classe TargetParameterCountException com sua cadeia de caracteres de mensagem definida como a mensagem fornecida e a exceção de causa raiz.Initializes a new instance of the TargetParameterCountException class with its message string set to the given message and the root cause exception. |
| TargetParameterCountException(String, Exception) |
Inicializa uma nova instância da classe TargetParameterCountException com uma mensagem de erro especificada e uma referência à exceção interna que é a causa da exceção.Initializes a new instance of the TargetParameterCountException class with a specified error message and a reference to the inner exception that is the cause of this exception. |
TargetParameterCountException()
Inicializa uma nova instância da classe TargetParameterCountException com uma cadeia de caracteres de mensagem vazia e a causa raiz da exceção.Initializes a new instance of the TargetParameterCountException class with an empty message string and the root cause of the exception.
public:
TargetParameterCountException();
public TargetParameterCountException ();
Public Sub New ()
Comentários
TargetParameterCountException herda de Exception.TargetParameterCountException inherits from Exception. Esse construtor define as propriedades do objeto de exceção, conforme mostrado na tabela a seguir.This constructor sets the properties of the Exception object as shown in the following table.
| PropriedadeProperty | ValorValue |
|---|---|
| InnerException | null |
| Message | A cadeia de caracteres vazia ("").The empty string (""). |
Aplica-se a
TargetParameterCountException(String)
Inicializa uma nova instância da classe TargetParameterCountException com sua cadeia de caracteres de mensagem definida como a mensagem fornecida e a exceção de causa raiz.Initializes a new instance of the TargetParameterCountException class with its message string set to the given message and the root cause exception.
public:
TargetParameterCountException(System::String ^ message);
public TargetParameterCountException (string message);
public TargetParameterCountException (string? message);
new System.Reflection.TargetParameterCountException : string -> System.Reflection.TargetParameterCountException
Public Sub New (message As String)
Parâmetros
- message
- String
Um String que descreve o motivo pelo qual essa exceção foi gerada.A String describing the reason this exception was thrown.
Comentários
TargetParameterCountException herda de Exception.TargetParameterCountException inherits from Exception. Esse construtor define as propriedades do Exception objeto, conforme mostrado na tabela a seguir.This constructor sets the properties of the Exception object as shown in the following table.
| PropriedadeProperty | ValorValue |
|---|---|
| InnerException | null |
| Message | A cadeia de caracteres da mensagem.The message string. |
Aplica-se a
TargetParameterCountException(String, Exception)
Inicializa uma nova instância da classe TargetParameterCountException com uma mensagem de erro especificada e uma referência à exceção interna que é a causa da exceção.Initializes a new instance of the TargetParameterCountException class with a specified error message and a reference to the inner exception that is the cause of this exception.
public:
TargetParameterCountException(System::String ^ message, Exception ^ inner);
public TargetParameterCountException (string message, Exception inner);
public TargetParameterCountException (string? message, Exception? inner);
new System.Reflection.TargetParameterCountException : string * Exception -> System.Reflection.TargetParameterCountException
Public Sub New (message As String, inner As Exception)
Parâmetros
- message
- String
A mensagem de erro que explica a razão da exceção.The error message that explains the reason for the exception.
- inner
- Exception
A exceção que é a causa da exceção atual.The exception that is the cause of the current exception. Caso o parâmetro inner não seja null, a exceção atual é acionada em um bloco catch que identifica a exceção interna.If the inner parameter is not null, the current exception is raised in a catch block that handles the inner exception.
Comentários
Uma exceção que é lançada como um resultado direto de uma exceção anterior deve incluir uma referência para a exceção anterior na propriedade InnerException.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. A propriedade InnerException retorna o mesmo valor passado ao construtor, ou null se a propriedade InnerException não fornecer o valor da exceção interna ao construtor.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.
A tabela a seguir mostra os valores de propriedade inicial de uma instância de TargetParameterCountException.The following table shows the initial property values for an instance of TargetParameterCountException.
| PropriedadeProperty | ValorValue |
|---|---|
| InnerException | A referência de exceção interna.The inner exception reference. |
| Message | A cadeia de caracteres da mensagem de erro.The error message string. |