How do I get properties from derived class in base class?
Base class:
public abstract class BaseModel { protected static readonly Dictionary
If both classes are in the same assembly, you can try this:
Assembly .GetAssembly(typeof(BaseClass)) .GetTypes() .Where(t => t.IsSubclassOf(typeof(BaseClass)) .SelectMany(t => t.GetProperties());
This will give you all the properties of all the subclasses of BaseClass.
BaseClass