I have a base case that gets derived so i have few int and string Auto properties
// base class
public virtual int MyVariable {get; set; };
// Derived class
private int myVariable = 0;
public override int MyVariable
{
get { return myVariable ; }
set { myVariable = value; }
}
How can i do the same with a Dictionary ?
It is pretty much the same, though you will of course need to change the type from
intto your dictionary type.Example with a
Dictionary<string,int>:Base class:
Derived class: