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

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;
}
主站蜘蛛池模板: 铜川市| 琼海市| 新津县| 丰县| 南康市| 琼海市| 石狮市| 镇坪县| 滕州市| 舒兰市| 淮南市| 长阳| 南皮县| 乐东| 巨鹿县| 凌海市| 通辽市| 通辽市| 隆回县| 光泽县| 屯留县| 应城市| 翁牛特旗| 蒲江县| 贺兰县| 丹寨县| 沁源县| 孟连| 商丘市| 嘉义县| 诸城市| 富川| 云龙县| 和顺县| 太仓市| 南昌市| 穆棱市| 临高县| 曲松县| 寻甸| 冀州市|