why we can't create an object for a static class??
what is the reason behind this?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / rahul
Because static method will have defined / stored entry point.
so while calling it , it's entry point is sufficient , without creating an object.
that's why no need to create object
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / luckraj
Static class does not allow to create
any object.....
Is This Answer Correct ? | 9 Yes | 9 No |
Answer / pushparaj pentakota (anakapall
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 ? | 1 Yes | 1 No |
What is Implementation inheritance
What are the uses of namespaces?
What is a singleton unity?
What the different phase/steps of acquiring a proxy object in webservice?
How can we Achieve Late binding in C#.Can any give one example.
What is binary search tree in data structure?
What is remote data?
How do I run managed code in a process?
What is generic collection in c#?
Which string method is used for concatenation of two strings in c#?
What is readline library?
How do you create empty strings in c#?