UnityEssentials
Small but useful tools and features for Unity
UnityEssentials
Unity Essentials
Assets
Essentials
Scripts
Extensions
ICollectionExtensions.cs
Go to the documentation of this file.
1
using
System.Collections.Generic;
2
using
System.Linq;
3
4
namespace
UnityEngine
5
{
9
public
static
class
ICollectionExtensions
10
{
15
public
static
T
RemoveFirst<T>
(
this
ICollection<T> collection)
16
{
17
T element = collection.FirstOrDefault();
18
if
(element !=
null
)
19
collection.Remove(element);
20
return
element;
21
}
22
}
23
}
UnityEngine
Definition:
CameraAnimation.cs:4
UnityEngine.ICollectionExtensions
Extensions for ICollection
Definition:
ICollectionExtensions.cs:10
UnityEngine.ICollectionExtensions.RemoveFirst< T >
static T RemoveFirst< T >(this ICollection< T > collection)
Removes the first element of the collection.
Definition:
ICollectionExtensions.cs:15
Generated by
1.9.1