私は基本的に私が望むことをする次のコードを持っています:
string firstName = "Chuck";
string lastName = "Norris";
filtered = dvds.Where(
dvd => (dvd.Element("Actors") != null) && (dvd.Element("Actors").Elements("Actor").Where(
actor => actor.Attribute("FirstName") != null && actor.Attribute("FirstName").Value == firstName
&& actor.Attribute("LastName") != null && actor.Attribute("LastName").Value == lastName)).Count() > 0);
ご覧のとおり、ラムダはかなり大きいです。最初の .Where 呼び出しにコールバック メソッドが必要です。しかし、そのコールバック メソッドに firstName パラメーターと lastName パラメーターを与える方法がわかりません。
それは可能ですか?