Show / Hide Table of Contents

    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 Source

    ListSlice(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 Source

    Count

    Gets the number of elements in the list.

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    System.Int32

    The number of elements.

    | Improve this Doc View Source

    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 Source

    GetEnumerator()

    Declaration
    public IEnumerator<T> GetEnumerator()
    Returns
    Type Description
    System.Collections.Generic.IEnumerator<T>

    Explicit Interface Implementations

    | Improve this Doc View Source

    IEnumerable.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

    Extension Methods

    Enumerables.AsList<T>(IEnumerable<T>)
    Enumerables.OrIfEmpty<T>(IEnumerable<T>, IEnumerable<T>)
    Enumerables.ZipEqual<T1, T2, TResult>(IEnumerable<T1>, IEnumerable<T2>, Func<T1, T2, TResult>)
    Enumerables.CreateSafetyCopy<T>(IEnumerable<T>)
    ListSliceExtensions.Take<T>(IReadOnlyList<T>, Int32)
    ListSliceExtensions.Skip<T>(IReadOnlyList<T>, Int32)
    • Improve this Doc
    • View Source
    Back to top Copyright - Daniel Pelsmaeker