クラスがあります
class Test
{
public string FirstProp { get; set; }
public string SecondProp { get; set; }
public string ThirdProp { get; set; }
}
およびオブジェクトのリスト
var list = new List<Test>
{
new Test { FirstProp = "xxx", SecondProp = "x2", ThirdProp = "x3" },
new Test { FirstProp = "xxx", SecondProp = "x21", ThirdProp = "x31" },
new Test { FirstProp = "yyy", SecondProp = "y2", ThirdProp = "y3" },
new Test { FirstProp = "yyy", SecondProp = "y21", ThirdProp = "y31" },
new Test { FirstProp = "xxx", SecondProp = "x22", ThirdProp = "x32" },
};
最初のFirstPropレコードを選択する必要があります。
FirstProp = "xxx", SecondProp = "x2", ThirdProp = "x3"
FirstProp = "yyy", SecondProp = "y2", ThirdProp = "y3"
を使用して最良の方法でそれを行う方法はlinq
?