By default constructors will be called whenever class is called, how make it to be called only once without making use of static constructors?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A static constructor is only called once per class. An instance constructor is called every time an instance of the class is created.
To me, it’s unclear why you can’t use the static constructor.