Open sandboxFocus

Method TryGetValue

TryGetValue<T>(string, out T, string)

Attempts to read a value from the collection, and does not throw an exception if the value does not exist.

Declaration
bool TryGetValue<T>(string name, out T value, string scope = null)
Parameters
Type Name Description
string name

The name of the argument.

T value

When this method returns, contains the value of the argument named name in the given optional scope.

string scope

An optional prefix of name, similar to a namespace.

Returns
Type Description
bool

true if the value is defined, otherwise false.

Type Parameters
Name Description
T

The type of the value.