ListEnumerator.Current Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieves the value that is pointed to by the enumerator.
public:
virtual System::Object ^ Current();
public object Current ();
abstract member Current : unit -> obj
override this.Current : unit -> obj
Public Function Current () As Object
Returns
The value that is currently pointed to in the list. The type of the return value is determined by the type of the items in the list.
Implements
Remarks
The following example iterates through the list and sets the dimensionTopic variable to the value of the current list element.
public DimensionTopic firstDimensionTopic()
{
DimensionTopic dimensionTopic;
ListEnumerator enumerator;
enumerator = this.getTopicsEnumerator();
if (enumerator.moveNext())
{
dimensionTopic = enumerator.current();
}
return dimensionTopic;
}