namespace MyNameSpace { static class MyClass { static MyClass() { //Authentication process.. User needs to enter password
From the documentation (emphasis mine):
A static constructor is called automatically to initialize the class before the first instance is created or any static members are referenced.