C#に2つの同様のクラスがあります
public class Property
{
public string version;
public string CCodeName { get; set; }
public string CDoc { get; set; }
public string ShortName { get; set; }
}
public class PropertyFieldsInExcel
{
public string ShortNames { get; set; }
public string CNames { get; set; }
public string CDoc { get; set; }
public string Version { get; set; }
}
この後、2 つのリストを作成しました。
static List<PropertyFieldsInExcel> listA = new List<PropertyFieldsInExcel>();
public List<Property> listB = new List<Property>();
ここで、これら 2 つのリストを双方向でバインドしたいと考えています。listA
同様に、対応する要素で何かが変更されるたびに、listB
更新する必要があります。
if と同様、listA[i].ShortName = "abc"
thenlistB[i].ShortName
も同じ値でなければなりません。
listA.Add()
トリガーする必要がlistB.Add()
あり、その逆も同様です。
ありがとうございました!