Recently I have been asked a question in interview.
Interviewer asked the below question
-When and who creates the instance of static class? Clearly creating a instance means allocating space in the memory. We cannot call methods without allocating space in memory.
I was confused because as per my knowledge static classes don't get instances created So I searched on internet and I found that for static class only once instance is created and that is when the first static method is called for the first time. Is it correct?
Second question who creates the instance? Is it CLR?