Share via


ParameterView.GetValueOrDefault Método

Definição

Sobrecargas

GetValueOrDefault<TValue>(String)

Obtém o valor do parâmetro com o nome especificado ou um valor padrão se nenhum parâmetro desse tipo existir na coleção.

GetValueOrDefault<TValue>(String, TValue)

Obtém o valor do parâmetro com o nome especificado ou um valor padrão especificado se nenhum parâmetro desse tipo existir na coleção.

GetValueOrDefault<TValue>(String)

Origem:
ParameterView.cs
Origem:
ParameterView.cs
Origem:
ParameterView.cs
Origem:
ParameterView.cs
Origem:
ParameterView.cs
Origem:
ParameterView.cs

Obtém o valor do parâmetro com o nome especificado ou um valor padrão se nenhum parâmetro desse tipo existir na coleção.

public:
generic <typename TValue>
 TValue GetValueOrDefault(System::String ^ parameterName);
public TValue GetValueOrDefault<TValue> (string parameterName);
public TValue? GetValueOrDefault<TValue> (string parameterName);
member this.GetValueOrDefault : string -> 'Value
Public Function GetValueOrDefault(Of TValue) (parameterName As String) As TValue

Parâmetros de tipo

TValue

Tipo do valor.

Parâmetros

parameterName
String

O nome do parâmetro.

Retornos

TValue

O valor do parâmetro, se encontrado; caso contrário, o valor padrão para o tipo especificado.

Aplica-se a

GetValueOrDefault<TValue>(String, TValue)

Origem:
ParameterView.cs
Origem:
ParameterView.cs
Origem:
ParameterView.cs
Origem:
ParameterView.cs
Origem:
ParameterView.cs
Origem:
ParameterView.cs

Obtém o valor do parâmetro com o nome especificado ou um valor padrão especificado se nenhum parâmetro desse tipo existir na coleção.

public:
generic <typename TValue>
 TValue GetValueOrDefault(System::String ^ parameterName, TValue defaultValue);
public TValue GetValueOrDefault<TValue> (string parameterName, TValue defaultValue);
member this.GetValueOrDefault : string * 'Value -> 'Value
Public Function GetValueOrDefault(Of TValue) (parameterName As String, defaultValue As TValue) As TValue

Parâmetros de tipo

TValue

Tipo do valor.

Parâmetros

parameterName
String

O nome do parâmetro.

defaultValue
TValue

O valor padrão a ser retornado se nenhum parâmetro desse tipo existir na coleção.

Retornos

TValue

O valor do parâmetro, se encontrado; caso contrário defaultValue, .

Aplica-se a