は、私は、型付きデータセットからの簡単な選択を持っている:LINQ:結果の種類は何ですか?
productlistはDataTableのデータセットのsk_productsからレコードで設定されているvar productlist = from prds in dsProducts.sk_products.AsEnumerable()
join prdcat in dsProducts.sk_productscategories.AsEnumerable() on prds.Field<int>("productid") equals prdcat.Field<int>("productid") where prdcat.Field<int>("categoryid") == categoryid
select prds;
。 私はそれのいずれかの列に明確なで、レコードの多くをフィルタリングする機能を記述したいと思います:
public List<string, string> GetDistinctManufacturerList(? productlist, int manufacturerid)
{
manufacturers = from prdz in productlist where prdz.Field<int>("manufacturerid") == manufacturerid select prdz; [...]
}
私は変数productlistを参照する必要があり、オブジェクトのどのようなタイプでは?
Adamsは.AsEnumerable()についてコメントしました。これはxmlに格納されている切断されたデータセットであるため、ここで必要です。 – balint