官术网_书友最值得收藏!

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;
}
主站蜘蛛池模板: 藁城市| 广宗县| 锡林浩特市| 高碑店市| 桂阳县| 长春市| 新宁县| 慈利县| 兴海县| 宽城| 黑河市| 荆门市| 澄江县| 安西县| 湘阴县| 仙桃市| 日照市| 镇平县| 长宁区| 房产| 阿克| 易门县| 新建县| 厦门市| 荃湾区| 清涧县| 岑巩县| 长岛县| 图片| 德惠市| 三原县| 青川县| 建昌县| 石渠县| 志丹县| 泗阳县| 牙克石市| 西昌市| 西和县| 陈巴尔虎旗| 都安|