# ToArrayMethod enum

Namespace: [Grasshopper2.Data](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.data.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public enum ToArrayMethod
```

Enumerates the possible behaviours for ToArray() methods on ITwig types.

## Values

| Name | Value | Description |
| --- | --- | --- |
| IfExists | 0 | If the cache exists a copy will be returned. If not, null will be returned. |
| Always | 1 | An array will be returned even if none already exists. |
