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 using in c#?

0 Answers  


How did you implemented classes in your project?

1 Answers   TCS,


What is c# best for?

0 Answers  


Is cli same as the clr?

0 Answers  


how to communicate inventory system and account system?

1 Answers  


What is hashtable in c# with example?

0 Answers  


What is args c#?

0 Answers  


Explain the difference between the system.array.copyto() and system.array.clone()?

0 Answers  


Does c# supports destructors?

9 Answers   Choice Solutions,


Which of these statements correctly declares a two-dimensional array in c#?

0 Answers  


Where do we set the min and max pool size for connection pooling?

0 Answers  


What is the difference between Object and class adapters?

0 Answers   QuestPond,


Categories