docs.unity3d.com
    Show / Hide Table of Contents

    Class ListExtensions

    Extension methods for List<T> objects

    Inheritance
    Object
    ListExtensions
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.XR.CoreUtils
    Syntax
    public static class ListExtensions

    Methods

    EnsureCapacity<T>(List<T>, Int32)

    Ensure that the capacity of this list is at least as large the given value

    Declaration
    public static void EnsureCapacity<T>(this List<T> list, int capacity)
    Parameters
    Type Name Description
    List<T> list

    The list whose capacity will be ensured

    Int32 capacity

    The minimum number of elements the list storage must contain

    Type Parameters
    Name Description
    T

    The list element type

    Fill<T>(List<T>, Int32)

    Fill the list with default objects of type T

    Declaration
    public static List<T> Fill<T>(this List<T> list, int count)
        where T : new()
    Parameters
    Type Name Description
    List<T> list

    The list

    Int32 count

    The number of items to fill the list with

    Returns
    Type Description
    List<T>

    The list that was filled

    Type Parameters
    Name Description
    T

    The type of objects in this list

    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023