How to reference a class that implements certain interface?
- by vikp
Hi,
I have an interface for logging the exceptions, i.e. IExceptionLogger.
This interface has 3 implementations: DBExceptionLogger, XMLExceptionLogger, CSVExceptionLogger.
I have an application that will make a use of DBExceptionLogger.
The application references only IExceptionLogger. How do I create an instance of DBExceptionLogger within the application.
I can't reference the DBExceptionLogger directly since it will break the purpose of having IExceptionLogger interface.
Thanks