> For the complete documentation index, see [llms.txt](https://docs.yarnspinner.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yarnspinner.dev/2.4/api/csharp/yarn/yarn.ivariablestorage.md).

# IVariableStorage

Interface in [Yarn](/2.4/api/csharp/yarn.md)

## Summary

Provides a mechanism for storing and retrieving instances of the `Yarn.Value` class.

```csharp
public interface IVariableStorage
```

## Methods

| Name                                                                                                      | Description                                |
| --------------------------------------------------------------------------------------------------------- | ------------------------------------------ |
| [Clear()](/2.4/api/csharp/yarn/yarn.ivariablestorage/yarn.ivariablestorage.clear.md)                      | Removes all variables from storage.        |
| [SetValue(string,bool)](/2.4/api/csharp/yarn/yarn.ivariablestorage/yarn.ivariablestorage.setvalue-3.md)   | Stores a `bool` in this VariableStorage.   |
| [SetValue(string,float)](/2.4/api/csharp/yarn/yarn.ivariablestorage/yarn.ivariablestorage.setvalue-2.md)  | Stores a `float` in this VariableStorage.  |
| [SetValue(string,string)](/2.4/api/csharp/yarn/yarn.ivariablestorage/yarn.ivariablestorage.setvalue-1.md) | Stores a `string` in this VariableStorage. |
| [TryGetValue(string,T)](/2.4/api/csharp/yarn/yarn.ivariablestorage/yarn.ivariablestorage.trygetvalue.md)  | Retrieves a value of type `T` by name.     |
