I am working on an exception handling level for my application.
I read several articles about interfaces and generics. I have used inheritance before quite a lot, and I like it in this area.
I have a very short design that I am going to implement:
public interface IMyExceptionLogger
{
public void LogException();
}
I'm a little confused about what I have to do next.
public class FooClass: IMyExceptionLogger
{
}
Should I implement a method LogException()inside FooClass? If so, then I'm trying to figure out how best to use an interface instead of a specific class ...
I have many classes that will use this interface, but I do not want to write an implementation of this interface in each class.
, , - , OO...
, .
.
, net4log , , .
Edit:
. , .. DBExceptionLogger, CSVExceptionLogger, XMLExceptionLogger .. , .
user338195