Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

ObjectUtils.EnumerateFirstElement(IEnumerable) Method

Returns the first element in the supplied enumerable.

[Visual Basic]
Public Overloads Shared Sub EnumerateFirstElement( _
   ByVal enumerable As IEnumerable _
)
[C#]
public static object EnumerateFirstElement(
   IEnumerable enumerable
);

Parameters

enumerable
The IEnumerable to use to enumerate elements.

Return Value

The first element in the supplied enumerable.

Exceptions

Exception Type Condition
IndexOutOfRangeException If the supplied enumerable did not have any elements.
ArgumentNullException If the supplied enumerable is a null reference (Nothing in Visual Basic).

See Also

ObjectUtils Class | Spring.Util Namespace | ObjectUtils.EnumerateFirstElement Overload List