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



why we can't create an object for a static class?? what is the reason behind this?..

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

why we can't create an object for a static class?? what is the reason behind this?..

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

why we can't create an object for a static class?? what is the reason behind this?..

Answer / luckraj

Static class does not allow to create
any object.....

Is This Answer Correct ?    9 Yes 9 No

why we can't create an object for a static class?? what is the reason behind this?..

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

Post New Answer

More C Sharp Interview Questions

What is Implementation inheritance

0 Answers  


What are the uses of namespaces?

0 Answers  


What is a singleton unity?

0 Answers  


What the different phase/steps of acquiring a proxy object in webservice?

0 Answers  


How can we Achieve Late binding in C#.Can any give one example.

5 Answers   Value Labs,






What is binary search tree in data structure?

0 Answers  


What is remote data?

0 Answers  


How do I run managed code in a process?

0 Answers  


What is generic collection in c#?

0 Answers  


Which string method is used for concatenation of two strings in c#?

0 Answers  


What is readline library?

0 Answers  


How do you create empty strings in c#?

0 Answers  


Categories