I've run into an easily solved but a design problem I've not encountered in my young life yet.
I have a class that needs to go through a few setup procedures before anything else happens.
However, during the construction of this class, I have in the constructor's parameters a delegate that can be passed so that the user can add their own information to the class.
When this is called however the scope that is creating the class still doesn't have a valid instance and therefore a null exception error occurs.
How do I design around this? Should I pass an instance of "this" to that delegate?
What is a good decision to make here? I have a "StartServices()" method where I could easily put the call to the delegate but I feel design wise it should be in the constructor.
Thanks for the advice!