Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
struct System.​Range
Assembly: System.Runtime
Represents a range that has start and end indexes.
Properties
Methods
public
bool
Equals​(object value)
value
An object to compare with this Range object.
Returns <see langword="true" /> if <paramref name="value" /> is of type <see cref="T:System.Range" /> and is equal to the current instance; otherwise, <see langword="false" /> .
Returns a value that indicates whether the current instance is equal to a specified object.
public
bool
Equals​(Range other)
other
A Range object to compare with this Range object.
Returns <see langword="true" /> if the current instance is equal to <paramref name="other" /> ; otherwise, <see langword="false" /> .
Returns a value that indicates whether the current instance is equal to another <see cref="T:System.Range" /> object.
public
int
GetHashCode​() Returns The hash code.
Returns the hash code for this instance.
public
ValueTuple`2
GetOffsetAndLength​(int length)
length
A positive integer that represents the length of the collection that the range will be used with.
Returns The start offset and length of the range.
Calculates the start offset and length of the range object using a collection length.
public
string
ToString​() Returns The string representation of the range.
Returns the string representation of the current <see cref="T:System.Range" /> object.
protected
void
Finalize​()
Inherited from object
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
public
Type
GetType​()
Inherited from object
Returns The exact runtime type of the current instance.
Gets the <see cref="T:System.Type" /> of the current instance.
protected
object
MemberwiseClone​()
Inherited from object
Returns A shallow copy of the current <see cref="T:System.Object" /> .
Creates a shallow copy of the current <see cref="T:System.Object" /> .