TryGetValue(string,T)

Method in IVariableAccess

Summary

Given a variable name, attempts to fetch a value for the variable, either from storage, initial values found in Program , or by evaluating a smart variable found in Program .

bool TryGetValue<T>(string variableName, out T result);

Parameters

Name
Description

string variableName

The name of the variable.

T result

If this method returns true , this parameter will contain the fetched value.

Type Parameters

Name
Description

T

The type of the value to return. The fetched value will be converted to this type, if possible.

Returns

true if a value could be fetched; false otherwise.

Last updated

Yarn Spinnerยฎ and Secret Labยฎ are trade marks of Secret Lab Pty. Ltd., and are used by Yarn Spinner Pty. Ltd. under license.