- Hands-On Object:Oriented Programming with C#
- Raihan Taher
- 68字
- 2021-07-02 12:44:36
The foreach construct
The foreach loops are new to the language and are used to iterate over a sequence of objects. Even though this is purely syntactic sugar in the language, the foreach loop is widely used when dealing with collections. The foreach loop inherently uses an IEnumerable<object> interface and should only be used for objects implementing this:
foreach (type variable in collection)
{
//statements;
}
推薦閱讀
- VMware View Security Essentials
- C語言程序設計習題解析與上機指導(第4版)
- 大學計算機基礎實驗教程
- UVM實戰
- QGIS Python Programming Cookbook(Second Edition)
- Web性能實戰
- Getting Started with Polymer
- 零基礎學Python編程(少兒趣味版)
- Python程序設計開發寶典
- Distributed Computing in Java 9
- Training Systems Using Python Statistical Modeling
- 少兒編程輕松學(全2冊)
- 大話代碼架構:項目實戰版
- Getting Started with Windows Server Security
- Instant AppFog