# AttributeExtensionMethods.ToName examples

Examples for [ToName](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.graphs.attributeextensionmethods/toname.md) in Grasshopper2.Types.Graphs.AttributeExtensionMethods.

## C#

```cs
using Grasshopper2.Types.Graphs;

// As an extension method
MetaName result = attribute.ToName();

// As a static method
result = AttributeExtensionMethods.ToName(attribute);
```

## Python

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

# As an extension method
result = attribute.ToName()

# As a static method
result = Grasshopper2.Types.Graphs.AttributeExtensionMethods.ToName(attribute)
```
