void Main()
{
var list = new YsListMe {
new Y()
{
Prop1 = "10",
Prop1Label = "foo1",
Prop2 = "1000",
Prop2Label = "foo2",
}.Dump(),
new Y()
{
Prop1 = "20",
Prop1Label = "foo2",
Prop2 = "2000",
Prop2Label = "foo3",
}.Dump(),
}.Dump();
list.Dump(true);
}
[Serializable]
public class YsListMe : List { }
public class Y
{
public string Prop1 { get; set; }
public string Prop1Label { get; set; } = "";
public string Prop2 { get; set; }
public string Prop2Label { get; set; } = "";
}