Using foreach with index in C# -

added by DotNetKicks
11/18/2019 7:09:25 AM

539 Views

Just a quick tip today! for and foreach loops are among the most useful constructs in a C# developer's toolbox. To iterate a collection, foreach is, in my opinion, more convenient than for in most cases. It works with all collection types, including those that are not indexable such as IEnumerable , and doesn't require to ...


0 comments