Fake GPS Location Pro Apk V2.5 Rout Go [Latest]
Click Here ->->->-> https://ssurll.com/2sCfKc
Updated version : 6.9.0, with the new Google Location spoof with Fly GPS Location jQ:
How do I access an specific IEnumerator for an IEnumerable type?
I have an class that returns an IEnumerable and I want to iterate over each of the elements in that type. IEnumerator exists, but all of the examples are done via a foreach loop. I'd like to use LINQ to do this. Is this possible, or do I have to use a foreach loop?
A:
IEnumerator is not a general purpose API for querying IEnumerable, and there is not LINQ way to retrieve items from specific element of the IEnumerable.
If you can change your class, you could include IEnumerator as a method return type, and use yield return inside it.
class MyClass : IEnumerable
{
public IEnumerator GetEnumerator()
{
yield return 1;
yield return 2;
yield return 3;
}
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
IEnumerator GetEnumeratorOfNext()
{
return GetEnumerator();
}
}
Then you could: