I couldn't find the answer in the internet so I gonna ask for your help. I have an abstract class:
public abstract class AbstractClass
{
String Name { get; }
}
Child Class 1:
public class ApplicationDetailsModel : AbstractClass
{
// This will implement unique properties
}
And each class that implements IComponent will implement a child of "AbstactClass".
An example implementation:
public class ExampleClass : IComponent
{
public ApplicationDetailsModel DetailsModel;
}
And an interface
public interface IComponent : IPageViewModel
{
AbstractClass DetailsModel { get; }
}
This example does not compile because the interface forces to implement
AbstractClass DetailsModel = new ApplicationDetailsModel();
Is there a correct way to force an implementation of a child property of a specific abstract class in an interface?
IComponent?