GH_IndexRange
Represents a range of indices.
Namespace: Grasshopper.Kernel.Data
Assembly: Grasshopper (in Grasshopper.dll)
Syntax
public struct GH_IndexRange : GH_ISerializable
The GH_IndexRange type exposes the following members.
Constructors
Name
Description
Public Method
GH_IndexRange(Int32)
Create a new singular range.
Public Method
GH_IndexRange(Int32, Int32)
Create a new range.
Properties
Name
Description
Public Property
Index0
Gets the first index in the range.
Public Property
Index1
Gets the last index in the range.
Public Property
Static Member
InvalidRange
Gets the predefined invalid range.
Public Property
IsSingular
Gets whether the range has zero length.
Public Property
IsValid
Gets whether this range is valid.
Public Property
Length
Gets the length of the range.
Public Property
Static Member
MaxValue
Methods
Name
Description
Public Method
AdjacentTo
Tests whether this range is adjacent to another.
Public Method
Contains(GH_IndexRange)
Tests whether a specified range is entirely contained within this range.
Public Method
Contains(Int32)
Tests whether a specified index is defined by this range.
Public Method
Static Member
Intersection
Create the intersection between two ranges.
Public Method
IntersectsWith
Tests whether certain indices are described by both this and another range.
Public Method
Static Member
Split
Split a range into two using an integer index.
Public Method
ToString
(Overrides ValueType.ToString..)
Public Method
Static Member
Union
Create a range which contains both input ranges.