var Foo = new[]{ new {Something = 321}};
我为什么要这样做(编译):
Console.WriteLine( Foo[0].Something );
但不是 :
Foo.ForEach(x => Console.WriteLine(x.Something));
var Foo = new[] { new { Something = 321 } }; Array.ForEach(Foo,x => Console.WriteLine(x.Something));
编译和工作.