Interview Question
1.Program for Singleton pattern. 2.What is private constructor and static constructor. 3.What do you mean by static? 4.When do you prefer static constructor. 5.What you write in static constructor. 6.Thread safety while creating Singleton pattern. 7.How you implicitly call Static Constructor. 8.What if static variable value is not assigned to that variable and you try to access it.How do you avoid such scenarios. 9.Design a Logger Framework. 10.Thread safety in Logger class. 11.Can you define const variable as a static. 12.How to you create a thread in a class for calling logger class to log particular data in your log file. 13.Program cc= new Program();//How do you stop other classes while they try to create an instance of class Program. 14.What are the difference ways to create a thread. 15.Can static constructor access all the members of a class? 16.when would a static constructor be called? 17.How to do you explicitly call a static constructor. ...