ienumerator
How Can I Use IEnumerator.Reset()?
How exactly is the right way to call IEnumerator.Reset? The documentation says: The Reset method is provided for COM interoperability. It does not neces开发者_运维技巧sarily need to be implemented;[详细]
2023-03-05 00:24 分类:问答Why do I need IEnumerator.Current in a class implementing IEnumerator<T>?
I have a class tha开发者_如何学编程t implements IEnumerator<string>.See below: public class MyClass : IEnumerator<string>[详细]
2023-02-14 15:37 分类:问答C++/CLI IEnumerable and IEnumerator implementation
Does anyone have a working, step-by-step example of how to implement IEnumerable and IEnumerator in C++/CLI? Alternatively, does someone know how to fix the following code from MS Connect which does n[详细]
2023-02-12 14:15 分类:问答Reusing an IEnumerable<T> results in false result, e.g. on .Any()
I\'m a little lost in deferred execution land: I declare an instance of an IEnumerable implementing class[详细]
2023-02-09 14:50 分类:问答Why does capturing a mutable struct variable inside a closure within a using statement change its local behavior?
Update: Well, now I\'ve gone and done it: I filed a bug report with Microsoft about this, as I seriously doubt that it is correct behavior. That said, I\'m still not 100% sure what to believe regardin[详细]
2023-02-03 20:56 分类:问答Dynamically generated class that implements IEnumerator<T> GetEnumerator() and IEnumerator IEnumerable.GetEnumerator()
I have a problem with Reflection.Emit. I want to have dynamically created class, that has simple implementation of ICollection. All methods I\'ve defined fine, instead of next two: public IEnumerator[详细]
2023-01-24 12:30 分类:问答Why implement IEnumerable(T) if I can just define ONE GetEnumerator?
Update: I appreciate all of the comments, which have essentially comprised unanimous opposition. While every objection raised was valid, I feel that the ultimate nail in the coffin was Ani\'s astute o[详细]
2023-01-16 09:45 分类:问答Can this code be refactored by using the reactive framework?
copy paste the following code in new C# console app. class Program { static void Main(string[] args) { var enumerator = new QueuedEnumerator<long>();[详细]
2023-01-11 05:41 分类:问答IEnumerator implementation problem
I have this code: public class Check21CSVRecord { public string TransactionType; public string TransactionCurrency;[详细]
2023-01-08 10:41 分类:问答Pattern for using IEnumerator<T> in interfaces
I have a C# class which needs to process a sequence of items (IEnumerable<T>) across a bunch of methods, so I cannot simply foreach inside a method. I call .GetEnumerator() and pass this IEnumer[详细]
2023-01-05 18:11 分类:问答
加载中,请稍侯......