public class Test
{
int i;
string s;
}
List<Test> testList = new List<Test>(); //assume there are some values in it.
List<int> intList = new List<int>(){ 1,2,3};
どのように言うのですか?items from testList where i is in intList
オブジェクトにlinqを使用してください。技術的にはList<Test> testIntList = testList.Where(t=>t.i in intList)
他のリストに基づいて1つのリストから選択するlinqクエリ
私はこの権利を理解しているかわかりません。これはどのように私はこの特定のクエリにあるかを知っています。それはどこにも定義されていない。 –
@Alex J - 式i => iは、それ自身の定義であるラムダ式です。このクエリでは、結合では 'intList'の値が使用されます。 – Enigmativity