> 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/api/csharp/yarn/yarn.ivariableaccess.md).

# IVariableAccess

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

## Summary

Provides a mechanism for retrieving values.

```csharp
public interface IVariableAccess
```

## Methods

| Name                                                                                                     | Description                                                                                                                                                                                                                                                                                                                      |
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [GetVariableKind(string)](/api/csharp/yarn/yarn.ivariableaccess/yarn.ivariableaccess.getvariablekind.md) | Gets the kind of variable named `name` .                                                                                                                                                                                                                                                                                         |
| [TryGetValue(string,T?)](/api/csharp/yarn/yarn.ivariableaccess/yarn.ivariableaccess.trygetvalue.md)      | Given a variable name, attempts to fetch a value for the variable, either from storage, initial values found in [Program](/api/csharp/yarn/yarn.ivariableaccess/yarn.ivariableaccess.program.md) , or by evaluating a smart variable found in [Program](/api/csharp/yarn/yarn.ivariableaccess/yarn.ivariableaccess.program.md) . |

## Properties

| Name                                                                                                           | Description                                                                                                                                                                                                              |
| -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [Program](/api/csharp/yarn/yarn.ivariableaccess/yarn.ivariableaccess.program.md)                               | Gets or sets the Yarn [Program](/api/csharp/yarn/yarn.ivariableaccess/yarn.ivariableaccess.program.md) that stores information about the initial values of variables, and is able to produce values for smart variables. |
| [SmartVariableEvaluator](/api/csharp/yarn/yarn.ivariableaccess/yarn.ivariableaccess.smartvariableevaluator.md) | Gets or sets the object to use when evaluating smart variables.                                                                                                                                                          |
