# RangeNotation.ToTree examples

Examples for [ToTree](https://developer.rhino3d.com/api/gh2/type/grasshopper2.rangenotation/totree.md) in Grasshopper2.RangeNotation.

## C#

```cs
using Grasshopper2;

// As an extension method
ITree result = ranges.ToTree();

// As a static method
result = RangeNotation.ToTree(ranges);
```

## Python

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

# As an extension method
result = ranges.ToTree()

# As a static method
result = Grasshopper2.RangeNotation.ToTree(ranges)
```
