Search Results for

    Show / Hide Table of Contents

    Class ListUtils

    Represents a series of Lists utility methods.

    Inheritance
    object
    ListUtils
    Namespace: TriLibCore.Utils
    Assembly: TriLibCore.Source.dll
    Syntax
    public static class ListUtils

    Methods

    FixIndexNonGeneric<T>(int, IList<T>)

    Fixes the given index, so it doesn't get outside the given List boundaries.

    Declaration
    public static int FixIndexNonGeneric<T>(int index, IList<T> list)
    Parameters
    Type Name Description
    int index

    The index.

    IList<T> list

    The List.

    Returns
    Type Description
    int

    The fixed element at the fixed index.

    Type Parameters
    Name Description
    T

    The List element type.

    FixIndex<T>(int, IList<T>)

    Fixes the given index, so it doesn't get outside the given List boundaries and returns the element at the fixed index.

    Declaration
    public static T FixIndex<T>(int index, IList<T> list)
    Parameters
    Type Name Description
    int index

    The index.

    IList<T> list

    The List.

    Returns
    Type Description
    T

    The fixed element at the fixed index.

    Type Parameters
    Name Description
    T

    The List element type.

    In this article
    Back to top TriLib documentation