Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

ObjectUtils.EnumerateElementAtIndex(IEnumerable, Int32) Method

Returns the element at the specified index using the supplied enumerable.

[Visual Basic]
Public Overloads Shared Sub EnumerateElementAtIndex( _
   ByVal enumerable As IEnumerable, _
   ByVal index As Integer _
)
[C#]
public static object EnumerateElementAtIndex(
   IEnumerable enumerable,
   int index
);

Parameters

enumerable
The IEnumerable to use to enumerate elements until the supplied index is reached.
index
The index of the element in the enumeration to return.

Return Value

The element at the specified index using the supplied enumerable.

Exceptions

Exception Type Condition
ArgumentOutOfRangeException If the supplied index was less than zero, or the supplied enumerable did not contain enough elements to be able to reach the supplied index.
ArgumentNullException If the supplied enumerable is a null reference (Nothing in Visual Basic).

See Also

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