Export (0) Print
Expand All

IEnumeratorContract<C>.GetCurrent Method

Returns the IContract in the collection at the current position of the enumerator.

Namespace:  System.AddIn.Contract.Collections
Assembly:  System.AddIn.Contract (in System.AddIn.Contract.dll)

C GetCurrent()

Return Value

Type: C
The IContract in the collection at the current position of the enumerator.

The return value of GetCurrent is undefined under any of the following conditions:

  • The enumerator is positioned before the first element in the collection, immediately after the enumerator is created or after Reset is called. MoveNext must be called to advance the enumerator to the first element of the collection before calling GetCurrent.

  • The last call to MoveNext returned false, which indicates the end of the collection.

  • The enumerator is invalidated due to changes made in the collection, such as adding, modifying, or deleting elements.

GetCurrent returns the same object until MoveNext is called. MoveNext sets the return value of GetCurrent to the next element.

.NET Framework

Supported in: 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft