BeerNames
2番目のリストに名前がないリストからリストを取得したい。
var myList=(from f in Beers where ...
select f.BeerNames).ToList
var storeList(from f in Store where...
select f).ToList()
MyListには、StoreListにないBeerNameがいくつか含まれます。それらのBeerNameを見つけるにはどうすればよいですか?試し.Except
てみ!Contains
ましたが、何か間違ったことをしていて、重要な知識が不足していることに気付きました。ありがとう
変えたら
var storeList(from f in Store where...
select f).ToList()
に
var storeList(from f in Store where...
select f.BeerNames).ToList()
その後、などを除いて使用できますList1.Except(List2)
。もっと良い方法があるかどうかわかりませんでした。これが明確でない場合は申し訳ありませんが...私はしようとしています:)