I have a base class that has the following property:
public virtual Dictionary<String, int> activity
{
get;
set;
}
A derived class overrides this as such:
Dictionary<string, int> myActivity = new Dictionary<string, int>()
{
{"result", 5},
{"total", 6}
};
public override Dictionary<string, int> activity
{
get
{
return myActivity;
}
}
I want to call the override dictionary from within the same assembly of the base class, but a different class.
so for example from Class2 I want to call:
Class1 c = new Class1();
And then try to access dictionary as such:
c.activity["result"]
I get an error saying it’s not within the dictionary?
The derived class is in another assembly…dll file.
Any ideas?
Thanks.
will work you override activity property in Class2 not in Class1