docs.unity3d.com
    Show / Hide Table of Contents

    Class OrderedSet<T>

    A HashSet which retains order of items as they are added or inserted. or A List which only contains unique references.

    Inheritance
    Object
    OrderedSet<T>
    Namespace: Unity.SelectionGroups
    Syntax
    public class OrderedSet<T> : IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable
    Type Parameters
    Name Description
    T

    Properties

    Count

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    Int32

    IsReadOnly

    Declaration
    public bool IsReadOnly { get; }
    Property Value
    Type Description
    Boolean

    Item[Int32]

    Declaration
    public T this[int index] { get; set; }
    Parameters
    Type Name Description
    Int32 index
    Property Value
    Type Description
    T

    Methods

    Add(T)

    Declaration
    public void Add(T item)
    Parameters
    Type Name Description
    T item

    AddRange(IEnumerable<T>)

    Declaration
    public void AddRange(IEnumerable<T> objectReferences)
    Parameters
    Type Name Description
    IEnumerable<T> objectReferences

    Clear()

    Declaration
    public void Clear()

    Contains(T)

    Declaration
    public bool Contains(T item)
    Parameters
    Type Name Description
    T item
    Returns
    Type Description
    Boolean

    CopyTo(T[], Int32)

    Declaration
    public void CopyTo(T[] array, int arrayIndex)
    Parameters
    Type Name Description
    T[] array
    Int32 arrayIndex

    GetEnumerator()

    Declaration
    public IEnumerator<T> GetEnumerator()
    Returns
    Type Description
    IEnumerator<T>

    IndexOf(T)

    Declaration
    public int IndexOf(T item)
    Parameters
    Type Name Description
    T item
    Returns
    Type Description
    Int32

    Insert(Int32, T)

    Declaration
    public void Insert(int index, T item)
    Parameters
    Type Name Description
    Int32 index
    T item

    Remove(T)

    Declaration
    public bool Remove(T item)
    Parameters
    Type Name Description
    T item
    Returns
    Type Description
    Boolean

    Remove(IList<T>)

    Declaration
    public void Remove(IList<T> items)
    Parameters
    Type Name Description
    IList<T> items

    RemoveAt(Int32)

    Declaration
    public void RemoveAt(int index)
    Parameters
    Type Name Description
    Int32 index
    Back to top
    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