docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method Fill

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

    Fills 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 to populate.

    int count

    The number of items to add to the list.

    Returns
    Type Description
    List<T>

    The list that was filled.

    Type Parameters
    Name Description
    T

    The type of objects in this list.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)