<PackageReference Include="SSH.NET" Version="2024.2.0" />

Range

struct Range : IEquatable<Range>
Represent a range has start and end indexes.
public static Range All { get; }

Create a Range object starting from first element to the end.

public Index End { get; }

Represent the exclusive end index of the Range.

public Index Start { get; }

Represent the inclusive start index of the Range.

public Range(Index start, Index end)

Construct a Range object using the start and end indexes.

public static Range EndAt(Index end)

Create a Range object starting from first element in the collection to the end Index.

public static Range StartAt(Index start)

Create a Range object starting from start index to the end of the collection.

public bool Equals(Range other)

Indicates whether the current Range object is equal to another Range object.

public ValueTuple<int, int> GetOffsetAndLength(int length)

Calculate the start offset and length of range object using a collection length.