Tell me please how you can determine the type that was passed to the parameter generics during inheritance
public abstract class BaseEntity
{
}
public class DogEntity : BaseEntity
{
}
public interface IAnimal
{
}
public abstract class Animal<TEntity> : IAnimal
where TEntity : BaseEntity
{
}
public class Dog : Animal<DogEntity>
{
}
I have only Dog entity type, I need to get DogEntity
Type type = typeof(Dog);
I would be grateful for any help or hint
Aucun commentaire:
Enregistrer un commentaire