It's purely syntactic sugar in that you could obtain the same behaviour without it, yes. Many other things are the same... for
, while
etc... To misquote Archimedes: "Give me if
and goto
, and I will move the code..."
No, the CLR doesn't have any concept of foreach
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…