docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method First

    First<T>(HashSet<T>)

    Gets the first element of a HashSet.

    Declaration
    public static T First<T>(this HashSet<T> set)
    Parameters
    Type Name Description
    HashSet<T> set

    Set to retrieve the element from

    Returns
    Type Description
    T

    The first element in the set

    Type Parameters
    Name Description
    T

    Type contained in the set

    Remarks

    Equivalent to the System.Linq .First() method, but does not allocate.

    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)