# ContainsKey(string)

> Returns true if a variable with the specified name exists.

## Definition

* **Type:** Method
* **Namespace:** [Unity.SmartStrings.PersistentVariables](/engine/6000.7/script-reference/unity/smartstrings/persistentvariables.md)
* **Assembly:** UnityEngine.SmartStringsModule

```csharp
public bool ContainsKey(string name)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The variable name to check for.

### Returns

| Type                                                          | Description                                                               |
| ------------------------------------------------------------- | ------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | `true` if a matching variable could be found or `false` if one could not. |
