Class ListSlice<T>
A slice of a read-only list.
Inheritance
System.Object
ListSlice<T>
Implements
System.Collections.Generic.IReadOnlyList<T>
System.Collections.Generic.IReadOnlyCollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Virtlink.Utilib.Collections
Assembly: Virtlink.Utilib.dll
Syntax
public sealed class ListSlice<T> : IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable
Type Parameters
Name | Description |
---|---|
T |
Constructors
| Improve this Doc View SourceListSlice(IReadOnlyList<T>, Int32, Int32)
Initializes a new instance of the ListSlice<T> class.
Declaration
public ListSlice(IReadOnlyList<T> list, int offset, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IReadOnlyList<T> | list | The list. |
System.Int32 | offset | The offset. |
System.Int32 | count | The number of elements. |
Properties
| Improve this Doc View SourceCount
Gets the number of elements in the list.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The number of elements. |
Item[Int32]
Gets the element at the specified index.
Declaration
public T this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index. |
Property Value
Type | Description |
---|---|
T | The element. |
Methods
| Improve this Doc View SourceGetEnumerator()
Declaration
public IEnumerator<T> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<T> |
Explicit Interface Implementations
| Improve this Doc View SourceIEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
Implements
System.Collections.Generic.IReadOnlyList<T>
System.Collections.Generic.IReadOnlyCollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable