私は linq メソッドに取り組んでいますが、戻り値の型をメソッド シグネチャと一致させることができないようです。どんなガイダンスでも大歓迎です。
ありがとう!
private static IEnumerable<KeyValuePair<string, string>> RunQuery(XDocument doc)
{
var data = from b in doc.Descendants("Company")
where b.Attribute("name").Value == "CompanyA"
from y in b.Descendants("Shirt")
from z in y.Descendants("Size")
select new
{
color = y.Attribute("id").Value,
price = z.Value
};
return data;
}