# Edge struct

Namespace: [Grasshopper2.Types.Graphs](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.types.graphs.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public readonly struct Edge : IEquatable<Edge>
```

An edge in a graph.

## Constructors

- [Edge](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.graphs.edge/ctor.md): (2 overloads) Create a new edge.

## Properties

- [A](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.graphs.edge/a.md): Gets the index of the node at the start of the edge.
- [Attributes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.graphs.edge/attributes.md): Gets the index of the attributes of this edge, or -1 if the edge has no attributes.
- [B](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.graphs.edge/b.md): Gets the index of the node at the end of the edge.
- [Bidirectional](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.graphs.edge/bidirectional.md): Gets whether this edge is two-way.

## Methods

- [Equals](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.graphs.edge/equals.md): (2 overloads)
- [GetHashCode](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.graphs.edge/gethashcode.md)
- [MakeBidirectional](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.graphs.edge/makebidirectional.md): Make this edge two-way.
- [MakeUnidirectional](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.graphs.edge/makeunidirectional.md): Make this edge one-way.
- [Reverse](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.graphs.edge/reverse.md): Reverse this edge.
- [WithAttributes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.graphs.edge/withattributes.md): Associate this edge with a different set of attributes.
