why we can't create an object for a static class??
what is the reason behind this?
Answer Posted / pushparaj pentakota
static blocks and static classes are executed before
constructor execution but object can be created while
executing the constructor only but static blocks are exected
before executing construtor so we can't create an object on
static classes.
| Is This Answer Correct ? | 23 Yes | 2 No |
Post New Answer View All Answers
What is datetime minvalue in c#?
What is data types in c#?
What are Indexers in C#?
How do you specify a custom attribute for the entire assembly?
Define constructor in c#.
Difference between type constructor and instance constructor? What is static constructor, when it will be fired? And what is its use?
What is wpf application in c#?
Why are mutable structs evil?
What are annotations in c#?
Is typeof c#?
Does c# support multiple inheritance (mi)?
What is type keyword in c#?
What types of object can I throw as exceptions?
What is a template class?
How does dependency injection work c#?