Click or drag to resize
IEnumerableExtensionsSingleT Method
Same semantics as Enumerable.Single(IEnumerable), but optimized for ILists. Throws an exception if list does not contain exactly 1 element. Otherwise returns that element.

Namespace: Bio.Util
Assembly: Bio.Core (in Bio.Core.dll) Version: 2.0.0.1 (2.0.0.1)
Syntax
public static T Single<T>(
	this IList<T> list
)

Parameters

list
Type: System.Collections.GenericIListT

[Missing <param name="list"/> documentation for "M:Bio.Util.IEnumerableExtensions.Single``1(System.Collections.Generic.IList{``0})"]

Type Parameters

T

[Missing <typeparam name="T"/> documentation for "M:Bio.Util.IEnumerableExtensions.Single``1(System.Collections.Generic.IList{``0})"]

Return Value

Type: T

[Missing <returns> documentation for "M:Bio.Util.IEnumerableExtensions.Single``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