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

Index

struct Index : IEquatable<Index>
Represent a type can be used to index a collection either from the start or the end.
public static Index End { get; }

Create an Index pointing at beyond last element.

public static Index Start { get; }

Create an Index pointing at first element.

public bool IsFromEnd { get; }

Indicates whether the index is from the start or the end.

public int Value { get; }

Returns the index value.

public Index(int value, bool fromEnd = false)

Construct an Index using a value and indicating if the index is from the start or from the end.

public static Index FromEnd(int value)

Create an Index from the end at the position indicated by the value.

public static Index FromStart(int value)

Create an Index from the start at the position indicated by the value.

public static Index op_Implicit(int value)

Converts integer number to an Index.

public bool Equals(Index other)

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

public int GetOffset(int length)

Calculate the offset from the start using the giving collection length.