I have a List class, and I would like to override GetEnumerator() to return my own Enumerator class. This Enumerator class would have two additional properties that would be updated as the Enumerator
开发者_StackOverflow中文版I have an interface that, among other things, implements a \"public IEnumerator GetEnumerator()\" method, so I can use the interface in a foreach statement.
It\'s been asked a couple of times on SO how you can implement a bidirectional enumerator (here, here). My question is not how (which is tri开发者_运维问答vial for most cases), but why no such type ex
Let\'s say I want to create a collection class that is thread-safe by default. Internally, the class has a protected List<T> property called Values.
I am using Aspose cells to manipulate Excel spreadsheets. One of the types in the API is a collection of Pictures in the spreadsheet, which derives from CollectionBase: