As we know, the foreach keyword generates GC objects every time you use the keyword. For some reason, it is not acceptable. If you really care about the performance and every single detail bothers, try this asset.
This is a complete replacement for foreach keyword. Support almost all collections and support break/continue. Full foreach feature, well tested and well documented.
Supported Collection Class
- Array
- ArrayList
- BitArray
- List
- Dictionary
- HashSet
- LinkedList
- Queue
- Stack
- SortedDictionary
Unsupported Collection Class
- SortedList
- Hashtable