docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method FindIndex

    FindIndex(int, int, Predicate<T>)

    Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the range of elements in the DynamicArray that starts at the specified index and contains the specified number of elements.

    Declaration
    public int FindIndex(int startIndex, int count, Predicate<T> match)
    Parameters
    Type Name Description
    int startIndex

    The zero-based starting index of the search.

    int count

    The number of elements in the section to search.

    Predicate<T> match

    The Predicate delegate that defines the conditions of the element to search for.

    Returns
    Type Description
    int

    The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, -1.

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