# ArrayEx.ToTypeArray<T> examples

Examples for [ToTypeArray<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.arrayex/totypearray.md) in Grasshopper2.Extensions.ArrayEx.

## C#

```cs
using Grasshopper2.Extensions;

// As an extension method
Type[] result = array.ToTypeArray();

// As a static method
result = ArrayEx.ToTypeArray(array);
```

## Python

```python
import clr
clr.AddReference('Grasshopper2')
import Grasshopper2.Extensions
clr.ImportExtensions(Grasshopper2.Extensions)

# As an extension method
result = array.ToTypeArray()

# As a static method
result = Grasshopper2.Extensions.ArrayEx.ToTypeArray(array)
```
