Class SwapCollectionExtensions
A set of extension methods for collections
Inheritance
System.Object
SwapCollectionExtensions
Namespace: UnityEngine.Rendering
Syntax
public static class SwapCollectionExtensions
Methods
TrySwap<TValue>(IList<TValue>, Int32, Int32, 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 |
---|---|---|
System.Collections.Generic.IList<TValue> | list | The list to remove the range |
Int32 | from | From index |
Int32 | to | To index |
System.Exception | error | The exception raised by the implementation |
Returns
Type | Description |
---|---|
System.Boolean | True if succeed, false otherwise |
Type Parameters
Name | Description |
---|---|
TValue | The value type stored on the list |