これは機能します:
from x in table.AsEnumerable()
where x.Field<string>("something") == "value"
select x.Field<decimal>("decimalfield");
しかし、これはしません:
from x in table.AsEnumerable()
.Where(y=>y.Field<string>("something") == "value")
.Select(y=>y.Field<decimal>("decimalfield"));
私も試しました:
from x in table.AsEnumerable()
.Where(y=>y.Field<string>("something") == "value")
.Select(y=>new { name = y.Field<decimal>("decimalfield") });
.Select()メソッドの2つのオーバーロードを見て、後者の2つは両方ともEnumerableRowCollectionを返す必要があると思いましたが、明らかに私は間違っています。私は何が欠けていますか?