# IoExtensionMethods.Rectangle examples

Examples for [Rectangle](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.ioextensionmethods/rectangle.md) in Grasshopper2.Extensions.IoExtensionMethods.

## C#

```cs
using Grasshopper2.Extensions;

// As an extension method
Rectangle3d result = reader.Rectangle(location);

// As a static method
result = IoExtensionMethods.Rectangle(reader, location);
```

## Python

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

# As an extension method
result = reader.Rectangle(location)

# As a static method
result = Grasshopper2.Extensions.IoExtensionMethods.Rectangle(reader, location)
```
