docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SwapCollectionExtensions

    A set of extension methods for collections

    Inheritance
    object
    SwapCollectionExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Rendering
    Assembly: Unity.RenderPipelines.Core.Runtime.dll
    Syntax
    public static class SwapCollectionExtensions

    Methods

    TrySwap<TValue>(IList<TValue>, int, int, out Exception)

    Tries to remove a range of elements from the list in the given range.

    Declaration
    [CollectionAccess(CollectionAccessType.ModifyExistingContent)]
    [MustUseReturnValue]
    public static bool TrySwap<TValue>(this IList<TValue> list, int from, int to, out Exception error)
    Parameters
    Type Name Description
    IList<TValue> list

    The list to remove the range

    int from

    From index

    int to

    To index

    Exception error

    The exception raised by the implementation

    Returns
    Type Description
    bool

    True if succeed, false otherwise

    Type Parameters
    Name Description
    TValue

    The value type stored on the 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)