Top "Enumerator" questions

Enables enumeration of items in a collection.

What do you exactly mean by HashMap's iterator is fail-fast and HashTable's enumerator isn't?

I was looking up the difference between the two classes and this point came up in a lot of the …

java iterator hashmap hashtable enumerator
Returning Multiple Values From Map

Is there a way to do: a = b.map{ |e| #return multiple elements to be added to a } Where rather …

ruby arrays map each enumerator
Get next N elements from enumerable

Context: C# 3.0, .Net 3.5 Suppose I have a method that generates random numbers (forever): private static IEnumerable<int> RandomNumberGenerator() { …

c# .net linq enumerator
Reverse a Queue

I'm using the extension menthod Reverse(), but it does not seem to be doing anything. The MSDN states it is …

c# .net queue reverse enumerator
Best way to convert a non-generic collection to generic collection

What is the best way to convert a non-generic collection to a generic collection? Is there a way to LINQ …

c# generics enumerator
How to iterate over two arrays at once?

I have two arrays built while parsing a text file. The first contains the column names, the second contains the …

c# iterator enumerator
Why is there no ReverseEnumerator in C#?

Does anyone know if there was a specific reason or design decision to not include a reverse enumerator in C#? …

c# enumerator