# TryGetValue(string,T)

Method in [InMemoryVariableStorage](https://docs.yarnspinner.dev/2.0/api/csharp/yarn.unity/yarn.unity.inmemoryvariablestorage)

## Summary

Retrieves a `Value` by name.

```csharp
public override bool TryGetValue<T>(string variableName, out T result)
```

## Parameters

| Name                  | Description                                                                                          |
| --------------------- | ---------------------------------------------------------------------------------------------------- |
| `string` variableName | The name of the variable to retrieve the value of. Don't forget to include the "$" at the beginning! |
| `T` result            |                                                                                                      |

## Returns

The `Value` . If a variable by the name of `variableName` is not present, returns a value representing `null`.
