C# equivalent of DllMain in C (WinAPI)

Give your class a static constructor and do your initialization there. It will run the first time anybody calls a static method or property of your class or constructs an instance of your class.

Leave a Comment