Struct ReadOnlySlice<T>
A slice of a read-only list.
Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.ValueType.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
Namespace: Flame.Collections
Assembly: Flame.dll
Syntax
public struct ReadOnlySlice<T>
Type Parameters
| Name | Description |
|---|---|
| T |
Constructors
| Improve this Doc View SourceReadOnlySlice(IReadOnlyList<T>)
Creates a read-only slice of a list that contains the entire list.
Declaration
public ReadOnlySlice(IReadOnlyList<T> list)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IReadOnlyList<T> | list | The list to "slice." |
ReadOnlySlice(IReadOnlyList<T>, Int32, Int32)
Creates a read-only slice of a list.
Declaration
public ReadOnlySlice(IReadOnlyList<T> list, int offset, int count)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IReadOnlyList<T> | list | The list to slice. |
| System.Int32 | offset | The offset in the list of the first element in the slice. |
| System.Int32 | count | The number of elements in the slice. |
Properties
| Improve this Doc View SourceCount
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Item[Int32]
Declaration
public T this[int index] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | index |
Property Value
| Type | Description |
|---|---|
| T |
Methods
| Improve this Doc View SourceToArray()
Creates an array whose elements are the same as this slice's.
Declaration
public T[] ToArray()
Returns
| Type | Description |
|---|---|
| T[] | An array. |