C#C
C#4y ago
Iceman228

Set property based on another

    public class XmlTabColumnDefinition
    {
        [XmlIgnore] public string KeyValue { get; set; };
        [XmlElement("KeyValue")] public XmlKeyValue XmlKeyValue { get; set; }
    }
    public class XmlKeyValue
    {
        [XmlAttribute("ColumnName")] public string ColumnName { get; set; };
    }

How can I set ColumnName based on KeyValue? Meaning when I change KeyValue during runtime, ColumnName gets the same value and the other way around.
Was this page helpful?