Share via


Seq<T>.First Method

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The latest Unity Application Block information can be found at the Unity Application Block site.

Return the first item in the given sequence.

Namespace:  Microsoft.Practices.ObjectBuilder2
Assembly:  Microsoft.Practices.ObjectBuilder2 (in Microsoft.Practices.ObjectBuilder2.dll)

Syntax

'Declaration
Public Function First As T
public T First()
public:
T First()
public function First() : T

Return Value

First item in the sequence.

Exceptions

Exception Condition
System.InvalidOperationException Thrown if the sequence is empty.

See Also

Seq<T> Class

Microsoft.Practices.ObjectBuilder2 Namespace