struct Range

in global :: System

Represents a range that has start and end indexes.


public Range( Index start, Index end )

Instantiates a new instance with the specified starting and ending indexes.

  • start The inclusive start index of the range.
  • end The exclusive end index of the range.

public static Range All { get; }

Gets a object that starts from the first element to the end.

  • Returns A range from the start to the end.

public Index End { get; }

Gets an that represents the exclusive end index of the range.

  • Returns The end index of the range.

public static Range EndAt( Index end )

Creates a object starting from the first element in the collection to a specified end index.

  • end The position of the last element up to which the object will be created.
  • Returns A range that starts from the first element to .

public bool Equals( object value )

Returns a value that indicates whether the current instance is equal to a specified object.

  • value An object to compare with this Range object.
  • Returns if is of type and is equal to the current instance; otherwise, .

public bool Equals( Range other )

Returns a value that indicates whether the current instance is equal to another object.

  • other A Range object to compare with this Range object.
  • Returns if the current instance is equal to ; otherwise, .

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

Returns a instance with the starting offset and length of a range.

  • length A positive integer that represents the length of the collection that the range will be used with.
  • Returns The starting offset and length of the range.

public Index Start { get; }

Gets the inclusive start index of the .

  • Returns The inclusive start index of the range.

public static Range StartAt( Index start )

Returns a new instance starting from a specified start index to the end of the collection.

  • start The position of the first element from which the Range will be created.
  • Returns A range from to the end of the collection.

public int GetHashCode( )

😔 No documentation found.

public string ToString( )

😔 No documentation found.

public Type GetType( )

😔 No documentation found.