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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How to override a function in c#?

540


How to declares a two-dimensional array in C#?

563


What are generations and how are they used by the garbage collector?

513


What is the compiler of c#?

487


Is c sharp open source?

483






What is the difference between const and static read-only?

496


What is private class in c#?

480


What is dbml file in c#?

532


Why do we use ienumerable in c#?

480


What are the advantages of interface in c#?

500


What is ispostback c#?

478


What is a int in c#?

457


How do you sort a list in c#?

483


What is c sharp used for?

490


What is difference between Trace and Debug

548