Queue Collection. Get Non Generic Enumerator Method
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.
Gets an object that implements the non-generic IEnumerator interface.
public: virtual System::Collections::IEnumerator ^ GetNonGenericEnumerator();
public: virtual System::Collections::IEnumerator ^ GetNonGenericEnumerator() = System::Collections::IEnumerable::GetEnumerator;
public virtual System.Collections.IEnumerator GetNonGenericEnumerator ();
abstract member GetNonGenericEnumerator : unit -> System.Collections.IEnumerator override this.GetNonGenericEnumerator : unit -> System.Collections.IEnumerator
Public Overridable Function GetNonGenericEnumerator () As IEnumerator
We recommend that you use the
foreach statement to iterate through all members of the collection. Use your own enumerator object only when you need to customize iteration, such as by skipping every other member.
If you need your own enumerator, we recommend that you use the generic, type-safe function GetEnumerator instead of GetNonGenericEnumerator. The GetNonGenericEnumerator is public only to fulfill the requirements of the IEnumerable interface, which is implemented by this collection.