TriLib
Search Results for

    Show / Hide Table of Contents

    Class ListUtils

    Represents a series of Lists utility methods.

    Inheritance
    object
    ListUtils
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: TriLibCore.Utils
    Assembly: TriLibCore.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 Generated by DocFX