I have the following class structure:
The user can select to work with SystemA or SystemB.
The following code is from the class that creates the main object:
public class MainViewModel()
{
var project = new Project();
project.PropAList = new List<IInterfaceA>();
project.PropAList.Add(new SystemB());
}
My problem is that i want to get to SystemB properties (like 'Date') from another class (ViewModel) that gets the 'project' object. But in this class i can see only the base properties (and IInterfaceA) of the object and not the objects that was implemented from the interfaces ("IsOpen' and 'Date'). For example: I have a method that sets the Date in some view model but i can't activate it because that i don't know if the user initiates SystemA or SystemB.
So i can't write for example:
project.PropAList[0].Date = "1.1.2000";
Thanks