Share via


ParameterView.GetValueOrDefault Method

Definition

Overloads

GetValueOrDefault<TValue>(String)

Gets the value of the parameter with the specified name, or a default value if no such parameter exists in the collection.

GetValueOrDefault<TValue>(String, TValue)

Gets the value of the parameter with the specified name, or a specified default value if no such parameter exists in the collection.

GetValueOrDefault<TValue>(String)

Source:
ParameterView.cs
Source:
ParameterView.cs
Source:
ParameterView.cs
Source:
ParameterView.cs
Source:
ParameterView.cs
Source:
ParameterView.cs
Source:
ParameterView.cs

Gets the value of the parameter with the specified name, or a default value if no such parameter exists in the collection.

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

Type Parameters

TValue

The type of the value.

Parameters

parameterName
String

The name of the parameter.

Returns

TValue

The parameter value if found; otherwise the default value for the specified type.

Applies to

GetValueOrDefault<TValue>(String, TValue)

Source:
ParameterView.cs
Source:
ParameterView.cs
Source:
ParameterView.cs
Source:
ParameterView.cs
Source:
ParameterView.cs
Source:
ParameterView.cs
Source:
ParameterView.cs

Gets the value of the parameter with the specified name, or a specified default value if no such parameter exists in the collection.

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

Type Parameters

TValue

The type of the value.

Parameters

parameterName
String

The name of the parameter.

defaultValue
TValue

The default value to return if no such parameter exists in the collection.

Returns

TValue

The parameter value if found; otherwise defaultValue.

Applies to