ICYMI C# 9 New Features: Adding foreach Support To Any Type

added by DotNetKicks
7/5/2021 7:19:21 AM

519 Views

This is part of a series of articles on new features introduced in C# 9. Prior to C# 9 you could add foreach support to a class by modifying the class and implementing the IEnumerable interface. With C# 9 you can add foreach support to an existing class without actually needing to modify that class.


0 comments