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 |
Which is the best institute in hyderabad to learn Sharepoint Portal?
What framework is used for performance testing/load testing?
What is the size of a decimal?
What is gui in c#?
What do you mean by parsing and how to parse a date time string in c#?
Why do we need serialization?
Explain the clr triggers?
What is the difference between double and decimal in c#?
What does m mean in decimal c#?
What is the difference between list and ilist in c#?
Can a static class have a constructor c#?
How can you achieve run time polymorphism in C#?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)