# SolutionId struct

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

```cs
public readonly struct SolutionId : IEquatable<SolutionId>, IComparable<SolutionId>
```

Provides an app-wide secure way to generate solution runtime ids.

## Properties

- [CancelledIds](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.solutionid/cancelledids.md): (static) Enumerate over the most recent cancelled solution IDs, starting with the most recent one. This iterator is thread-safe, but does not update during its lifespan. Calling [SolutionId.IsCancelled(SolutionId)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.solutionid/iscancelled.md) is a much faster way to check for a specific cancellation.
- [IsValid](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.solutionid/isvalid.md): Gets whether this is a valid Id.
- [None](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.solutionid/none.md): (static) Gets an unset solution id.

## Methods

- [CompareTo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.solutionid/compareto.md): Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
- [Equals](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.solutionid/equals.md): (2 overloads) Indicates whether this instance and a specified object are equal.
- [GetHashCode](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.solutionid/gethashcode.md): (2 overloads) Returns the hash code for this instance.
- [IsCancelled](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.solutionid/iscancelled.md): (2 overloads, static) Gets whether a specific solution has been cancelled. There is at present no way to check whether an id is still running or whether it has completed.
- [ToString](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.solutionid/tostring.md): Returns the fully qualified type name of this instance.

## Operators

- [operator ==](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.solutionid/op-equality.md): (static) Test two solutions for equality. Invalid solutions are not equal to anything, even other invalid solutions.
- [operator >](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.solutionid/op-greaterthan.md): (static) Test two solutions for greater-than-ness. Invalid solutions are smaller than valid solutions, older valid solutions are smaller than newer valid solutions.
- [operator >=](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.solutionid/op-greaterthanorequal.md): (static) Test two solutions for equality or greater-than-ness. Invalid solutions are smaller than valid solutions, older valid solutions are smaller than newer valid solutions.
- [operator !=](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.solutionid/op-inequality.md): (static) Test two solutions for inequality. Invalid solutions are not equal to anything, even other invalid solutions.
- [operator <](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.solutionid/op-lessthan.md): (static) Test two solutions for smaller-than-ness. Invalid solutions are smaller than valid solutions, older valid solutions are smaller than newer valid solutions.
- [operator <=](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.solutionid/op-lessthanorequal.md): (static) Test two solutions for equality or smaller-than-ness. Invalid solutions are smaller than valid solutions, older valid solutions are smaller than newer valid solutions.
