# Paths class

Namespace: [Grasshopper2.Data](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.data.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
[IoId("00000000-955f-4788-8d91-8c0271508d9a")]
[DebuggerDisplay("{DebuggerDisplay}")]
public sealed class Paths : IEnumerable<Path>, IStorable
```

A sorted collection of unique paths.

## Constructors

- [Paths](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/ctor.md): (3 overloads) Create a new path collection.

## Properties

- [Backwards](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/backwards.md): Enumerate over all paths in a backwards fashion.
- [Count](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/count.md): Gets the number of elements in this collection.
- [DebuggerDisplay](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/debuggerdisplay.md): Gets a single line description of these paths.
- [Empty](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/empty.md): (static) Gets an empty paths collection.
- [First](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/first.md): Gets the first path in this collection, or null if this collection is empty.
- [Forwards](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/forwards.md): Enumerate over all paths in a forwards fashion.
- [Last](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/last.md): Gets the last path in this collection, or null if this collection is empty.
- [Longest](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/longest.md): Gets the last, longest path in this collection.
- [Shortest](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/shortest.md): Gets the first, shortest path in this collection.
- [Zero](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/zero.md): (static) Gets a paths collection with a single path of value {0}.

## Indexers

- [this[]](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/item.md): (2 overloads) Gets the path at the given index. If implied is true, indices which exceed the collection size will yield valid results instead of IndexOutOfRange exceptions.

## Methods

- [Append](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/append.md): Append a path to the end of this collection. The path must not already exist within this collection and must be sorted higher than the current ultimate path.
- [CanSimplify](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/cansimplify.md): Test whether this collection of paths can be simplified.
- [CreateConsecutive](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/createconsecutive.md): (static) Create a number of consecutive paths by incrementing a template.
- [Cull](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/cull.md): Remove paths from this collection using a culling pattern.
- [Ensure](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/ensure.md): Ensure a path exists in this collection.
- [Equals](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/equals.md): Determines whether the specified object is equal to the current object.
- [Exists](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/exists.md): Gets whether this collection contains a specific path.
- [FromUnchecked](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/fromunchecked.md): (static) Create a valid Paths collection from a potentially invalid collection. Null and colliding paths will be omitted.
- [FromUnsorted](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/fromunsorted.md): (2 overloads, static) Create a Paths instance from a collection of unsorted paths. If the collection contains identical paths, an exception will be thrown.
- [GetHashCode](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/gethashcode.md): Serves as the default hash function.
- [IStorable.Store](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/grasshopperio-istorable-store.md)
- [Index](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/index.md): Gets the index of the given path.
- [Insert](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/insert.md): Insert a path into this collection. The path must not already exist within this collection.
- [MakeIncremental](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/makeincremental.md): Simplify the numbering of a path collection. This means subsequent paths only ever increment by a single unit in a single location. If the paths in this collection have varying length, this method will do nothing.
- [PartialEquals](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/partialequals.md): Test whether these paths are a partial subset of some other path collection. That is, whether each path in this collection can be matched up with a path in the super set which is either identical or which starts in a similar way.
- [Remove](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/remove.md): Remove the given path if it exists.
- [RemoveAt](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/removeat.md): Remove the path at the given index.
- [Simplify](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/simplify.md): Simplify this path collection by removing those path elements shared amongst all paths.
- [IEnumerable<Path>.GetEnumerator](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/system-collections-generic-ienumerable-grasshopper2-data-path-getenumerator.md)
- [IEnumerable.GetEnumerator](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/system-collections-ienumerable-getenumerator.md)
- [ToNodeHierarchy](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/tonodehierarchy.md): Create a path node hierarchy from this path list.
- [ToString](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/tostring.md)

## Operators

- [operator +](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/op-addition.md): (4 overloads, static) Add a prefix to all the paths.
- [operator ==](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/op-equality.md): (static) Compare two Paths instances for equality.
- [operator !=](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.paths/op-inequality.md): (static) Compare two Paths instances for inequality.
