# Range<T> struct

Namespace: [Eto.Forms](https://eto.picoe.ca/api/namespace/eto.forms.md) · Assembly: [Eto](https://eto.picoe.ca/api/assembly/eto.md)

```cs
public struct Range<T> : IEquatable<Range<T>>
```

Represents an immutable, inclusive start/end range of [IComparable<T>](https://learn.microsoft.com/dotnet/api/system.icomparable-1) values

**Type parameters:**

- `T` (where struct, IComparable<T>)

## Constructors

- [Range<T>](https://eto.picoe.ca/api/type/eto.forms.range-1/ctor.md): (2 overloads) Initializes a new instance of the [Range<T>](https://eto.picoe.ca/api/type/eto.forms.range-1.md) struct.

## Properties

- [End](https://eto.picoe.ca/api/type/eto.forms.range-1/end.md): Gets the end value of the range.
- [Start](https://eto.picoe.ca/api/type/eto.forms.range-1/start.md): Gets the start value of the range

## Methods

- [Contains](https://eto.picoe.ca/api/type/eto.forms.range-1/contains.md): Determines if the specified `value` is between or equal to the [Range<T>.Start](https://eto.picoe.ca/api/type/eto.forms.range-1/start.md) and [Range<T>.End](https://eto.picoe.ca/api/type/eto.forms.range-1/end.md) of this range.
- [Equals](https://eto.picoe.ca/api/type/eto.forms.range-1/equals.md): (2 overloads) Determines whether the specified [object](https://learn.microsoft.com/dotnet/api/system.object) is equal to the current [Range<T>](https://eto.picoe.ca/api/type/eto.forms.range-1.md).
- [GetHashCode](https://eto.picoe.ca/api/type/eto.forms.range-1/gethashcode.md): Serves as a hash function for a [Range<T>](https://eto.picoe.ca/api/type/eto.forms.range-1.md) object.
- [Intersect](https://eto.picoe.ca/api/type/eto.forms.range-1/intersect.md): Gets the intersection of this instance and the specified `range`.
- [Intersects](https://eto.picoe.ca/api/type/eto.forms.range-1/intersects.md): Determines if the specified `range` intersects (overlaps) this instance.
- [Iterate](https://eto.picoe.ca/api/type/eto.forms.range-1/iterate.md): Iterates the range between the start and end values.
- [ToString](https://eto.picoe.ca/api/type/eto.forms.range-1/tostring.md): Returns a [string](https://learn.microsoft.com/dotnet/api/system.string) that represents the current [Range<T>](https://eto.picoe.ca/api/type/eto.forms.range-1.md).
- [Touches](https://eto.picoe.ca/api/type/eto.forms.range-1/touches.md): Determines if the specified `range` touches (but doesn't intersect) this instance.
- [Union](https://eto.picoe.ca/api/type/eto.forms.range-1/union.md): (2 overloads) Gets the union of this instance and the specified `range`, including touching ranges.
- [WithEnd](https://eto.picoe.ca/api/type/eto.forms.range-1/withend.md): Creates a copy of the current range with a different end value.
- [WithStart](https://eto.picoe.ca/api/type/eto.forms.range-1/withstart.md): Creates a copy of the current range with a different start value.

## Operators

- [operator ==](https://eto.picoe.ca/api/type/eto.forms.range-1/op-equality.md): (static) Operator to compare two ranges for equality
- [operator !=](https://eto.picoe.ca/api/type/eto.forms.range-1/op-inequality.md): (static) Operator to compare two ranges for inequality.
