A bit of a weird question but I was wondering anyone could help...
In C++, I could do something like this
class MyOtherClass
{
private:
It's actually a lot simpler in C#.
Basically, you can do this:
MyLogger logger = new MyLogger();
MyOtherClass myOtherClass = new MyOtherClass(logger);
MyClass myClass = new MyClass(logger);
In C#, the classes are basically kept around as references (really just pointers under the hood). In this snippet, you are passing the reference to logger to the constructors of both objects. That reference is the same, so each instance has the same MyLogger instance.
In this particular instance, you pretty much just need to remove the pointer syntax =D