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 |
How can i Spawn a Thread
What is readline library?
what are the benefits in using c# ?
What are the ways to deploy an assembly?
2 Answers Siebel Systems, Visual Soft,
What is the difference between int and int in c#?
please exaplain gridview and what are the process available for it. how to add the row number automatically? is it possible to add child controls ?
What are the types of methods in c#?
Where static variables are stored?
what is the equivalent to regsvr32 and regsvr32 /u a file in .net development?
Is null c# operator?
What?s a multicast delegate?
How do you implement multiple inheritance in .NET?