IEnumerableExtensionsFirstT Method |
Same semantics as Enumerable.First(), but optimized for ILists. Throws an exception if the list is empty.
Namespace: Bio.UtilAssembly: Bio.Core (in Bio.Core.dll) Version: 2.0.0.1 (2.0.0.1)
Syntax public static T First<T>(
this IList<T> list
)
<ExtensionAttribute>
Public Shared Function First(Of T) (
list As IList(Of T)
) As T
public:
[ExtensionAttribute]
generic<typename T>
static T First(
IList<T>^ list
)
[<ExtensionAttribute>]
static member First :
list : IList<'T> -> 'T
Parameters
- list
- Type: System.Collections.GenericIListT
[Missing <param name="list"/> documentation for "M:Bio.Util.IEnumerableExtensions.First``1(System.Collections.Generic.IList{``0})"]
Type Parameters
- T
[Missing <typeparam name="T"/> documentation for "M:Bio.Util.IEnumerableExtensions.First``1(System.Collections.Generic.IList{``0})"]
Return Value
Type:
T[Missing <returns> documentation for "M:Bio.Util.IEnumerableExtensions.First``1(System.Collections.Generic.IList{``0})"]
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IListT. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also