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

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;
}
主站蜘蛛池模板: 安徽省| 即墨市| 虹口区| 苏尼特右旗| 常州市| 元谋县| 南汇区| 江安县| 海伦市| 云林县| 航空| 谷城县| 三亚市| 岳阳县| 电白县| 北京市| 景宁| 内黄县| 盐山县| 哈尔滨市| 马龙县| 平昌县| 三台县| 通城县| 勃利县| 南投市| 盖州市| 福海县| 太保市| 九龙坡区| 建阳市| 曲靖市| 山东省| 湾仔区| 灵台县| 丽水市| 虎林市| 涞源县| 玉环县| 呼和浩特市| 抚远县|