ienumerator
How do I implement a basic Enumerator class?
I am trying to understand how Enumerator class works. Specifically, I do not know how the yielder object is created and passed to the code block that the constructor takes.[详细]
2023-04-13 07:46 分类:问答How to realize right IEnumerator interface for multiple foreach?
I have a code like: class T : IEnumerable, IEnumerator { private int position = -1; public T() { } public IEnumerator GetEnumerator() { return开发者_运维技巧 this; }[详细]
2023-04-11 08:59 分类:问答Detecting modifications with an IEnumerable
I have a question that I am surprised hasn\'t already been asked in exactly this format. If I have an IEnumerable that is generated based on iterating through a source of data, (and using a yield ret[详细]
2023-04-04 05:09 分类:问答What do you call IEnumerable<Foo>?
I sometimes find myself thinking what word to use when referring an IEnumerable<Foo>. I don\'t think I see a consistent naming when reading.[详细]
2023-04-02 03:13 分类:问答Help getting generic AVL tree to compile (IEnumerator issue) in C#
I\'m getting a few compile errors in an AVL tree I\'m trying to implement. something is throwing the whole enumerator off. It compiled fine until I tried to implement a helper class. I was thinking it[详细]
2023-03-29 09:02 分类:问答Rhino Mocks: Stubbing an IEnumerator<T>
I\'m developing a little .net 2.0 project. I get to the point where I need to test some class\'s method which takes an IEnumerator. As a few days ago I learnt to use Rhino Mocks I wrote the following[详细]
2023-03-27 05:25 分类:问答Get number of columns and column names from LinQ result set
I am creating a Grid view user control and I would like to know how to get the number of columns and the column names from the LinQ result set. This will be used to create a dynamic grid view.[详细]
2023-03-22 20:04 分类:问答How do I pick the most recently created folder using Foreach loop container in SSIS package?
I\'ve got an interesting challenge with SSIS.Using a for-each file enumerator, I need to pick the subfolder which has been most recently created, and then iterate through each of the files.[详细]
2023-03-17 07:52 分类:问答Cleaning up with IDisposable issues
I am trying to call these functions to get rid of stuff I don\'t need, but my code seems to be defeating me in what I am begining to perceive to be a vain struggle. I have tried multiple ways to solve[详细]
2023-03-10 13:42 分类:问答ReSharper: Possible NullReferenceException with Enumerator?
ReSharper notifies me about a possible System.NullReferenceException for the following code: IEnumerator<IEdgeData> edgeEnumerator = edgeData.GetEnumerator();[详细]
2023-03-05 02:01 分类:问答