JasinCole
Well-known member
- Joined
- Feb 16, 2023
- Messages
- 66
- Programming Experience
- 1-3
How do you handle DI when using abstract base class?
It seems I must do this
But at this point why do I need a base class if every other class is passing along the dependency?
C#:
public abstract class Base
{
protected Object obj;
protected Base(Object obj)
{
Obj = obj;
}
}
It seems I must do this
C#:
public class ClassA
{
public ClassA(Object obj) : base(obj)
{
}
}
But at this point why do I need a base class if every other class is passing along the dependency?