Search Results for

    Show / Hide Table of Contents

    Struct ValueList<T>

    A growable list that is implemented as a value type. This type is mainly intended for use by other collection types, and is not a drop-in replacement for System.Collections.Generic.List.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Flame.Collections
    Assembly: Flame.dll
    Syntax
    public struct ValueList<T>
    Type Parameters
    Name Description
    T

    Constructors

    | Edit this page View Source

    ValueList(ValueList<T>)

    Creates a list by copying another list's contents.

    Declaration
    public ValueList(ValueList<T> other)
    Parameters
    Type Name Description
    ValueList<T> other

    The list whose contents are to be copied.

    | Edit this page View Source

    ValueList(IEnumerable<T>)

    Creates a list from a sequence of values.

    Declaration
    public ValueList(IEnumerable<T> values)
    Parameters
    Type Name Description
    IEnumerable<T> values

    The values to put in the list.

    | Edit this page View Source

    ValueList(int)

    Creates a list with an initial capacity.

    Declaration
    public ValueList(int initialCapacity)
    Parameters
    Type Name Description
    int initialCapacity

    The list's initial capacity.

    Properties

    | Edit this page View Source

    Capacity

    Gets the size of this list's backing array.

    Declaration
    public int Capacity { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    Count

    Gets the number of items in this list.

    Declaration
    public readonly int Count { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    IsInitialized

    Tells if this value list has been properly initialized by a constructor.

    Declaration
    public bool IsInitialized { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    this[int]

    Gets the element at the given index in this list.

    Declaration
    public T this[int index] { get; set; }
    Parameters
    Type Name Description
    int index
    Property Value
    Type Description
    T
    | Edit this page View Source

    Items

    Gets the backing array for this list.

    Declaration
    public readonly T[] Items { get; }
    Property Value
    Type Description
    T[]

    Methods

    | Edit this page View Source

    Add(T)

    Appends the given value to this list.

    Declaration
    public void Add(T value)
    Parameters
    Type Name Description
    T value
    | Edit this page View Source

    AddRange(ValueList<T>)

    Appends the given value list to this list.

    Declaration
    public void AddRange(ValueList<T> values)
    Parameters
    Type Name Description
    ValueList<T> values
    | Edit this page View Source

    RemoveAt(int)

    Removes the element at the given index. All values to the right of the given index are shifted one position to the left.

    Declaration
    public void RemoveAt(int index)
    Parameters
    Type Name Description
    int index
    | Edit this page View Source

    Reserve(int)

    Minimizes at least the given capacity in this list.

    Declaration
    public void Reserve(int minimalCapacity)
    Parameters
    Type Name Description
    int minimalCapacity
    | Edit this page View Source

    ToArray()

    Copies the contents of this value list to an array.

    Declaration
    public T[] ToArray()
    Returns
    Type Description
    T[]

    An array.

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX