// Summary:
// Public enumerator, which supports simple iteration on a non-generic set.
[Comvisible (true)]
[GUID ("496b0abe-cdee-11d3-88e8-00902754c43a")]
Public interface ienumerable
{
// Summary:
// Returns an enumerator for the cyclic access set.
//
// Return result:
// The system. Collections. ienumerator object that can be used to access the set cyclically.
[Dispid (-4)]
Ienumerator getenumerator ();
}
Method:
Method |
Method Name |
Description |
Getenumerator |
Getenumerator |
Get an iterator for the loop access set
|
Asparallel |
Asparallel |
Enable query parallelization. (Defined by parallelenumerable .) (Extension Method) |
Asqueryable |
Asqueryable |
Convert ienumerable to iqueryable. (Defined by queryable .) |
Cast <tresult> |
Cast <tresult> |
Forcibly convert the ienumerable element to the specified type. (Defined by enumerable .) |
Oftype <tresult> |
Oftype <tresult> |
Filters ienumerable elements based on the specified type. (Defined by enumerable .) |
Note:
Ienumerable is an enumeration interface for any non-generic set. For the generic version of this interface, see system. Collections. Generic. ienumerable <t>. Ienumerable contains a method, getenumerator, which returns ienumerator. Ienumerator can display the current attributes and movenext and reset Methods cyclically through a set.
It is an optimal method for implementing ienumerable and ienumerator to enable the foreach (for each in Visual Basic) syntax in the Set option class. However, ienumerable does not need to be implemented. If you do not implement ienumerable in the collection, you must also follow the iterator form to support this syntax by providing the return interface, option class, or structure's getenumerator method. When using Visual Basic, you must provide ienumerator implementation, which is returned by getenumerator. When C # is required for development, an option class with the current attribute and the terminator ienumerator described by movenext and reset methods are included. However, the option class does not need to implement ienumerator.
Example program: see the ienumerator enumeration number interface Example
Http://4837471.blog.51cto.com/4827471/1561773
This article is from the coffee blog, please be sure to keep this source http://4837471.blog.51cto.com/4827471/1561816
Ienumerable public enumerator