# CopyTo(KeyValuePair<string, IVariable>[], int)

> Copies the variables into an array starting at arrayIndex.

## Definition

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

```csharp
public void CopyTo(KeyValuePair<string, IVariable>[] array, int arrayIndex)
```

### Parameters

**** (\[KeyValuePair\<string, IVariable>\[]]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair)): The array to copy the variables into.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The index to start copying the items into.
