As far as I know you can can’t pass parameters to a static constructor in C#.
However I do have 2 parameters I need to pass and assign them to static fields before I create an instance of a class. How do I go about it?
As far as I know you can can’t pass parameters to a static constructor
Share
This may be a call for … a Factory Method!
You may want to put a check that ‘bar’ is already initialized (or not) as appropriate.