I'm quite new to c#. Would like to have default values in my POCO. Path2 should depend on Path1 or extend it respectively.
public class Config
{
public string Path1 { get; set; }
public string Path2 { get; set; }
...
}
public Config()
{ Path1 = "testpath";
Path2 = path1 + "bla";
...}
If now the user changes Path1 in the UI, I want Path2 also changed accordingly.
Config testconfig = new Config();
testconfig.Path1 = "changed";
But Path2 stays at "testpath bla" instead of "changed bla".
I guess I am missing something essential here. Could someone kick me in the right direction please?
Regards