你的位置: 码友网首页 / 资讯源列表 / Using foreach with index in C#

关于[Using foreach with index in C#]的摘要:

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 access the current element by its index.

原文地址: https://thomaslevesque.com/2019/11/18/using-foreach-with-index-in-c/

收录时间: 2019-11-19 浏览量: 2830 分类: C#开发

| 0 收藏 | 0