Program.TryGetInitialValue(string,T)

Method in Program

Summary

Attempts to fetch a value for a variable named variableName from this program’s collection of initial values.

public bool TryGetInitialValue<T>(string variableName, out T result)

Parameters

NameDescription
string variableNameThe name of the variable to retrieve a value for.
T resultOn return, contains the value of the variable, or the default value of T if not known. Depending on what T is, this value may be null .

Type Parameters

NameDescription
TThe type of variable to retrieve.

Returns

true if an initial value for variableName was found; false otherwise.