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

What is asp net c#?

678


Can we change static variable value in c#?

673


What does async mean in c#?

723


Difference between type constructor and instance constructor? What is static constructor, when it will be fired? And what is its use?

747


What are the advantages of generics in c#?

687


What is difference between override and new in c#?

721


Why is c# good for games?

725


What is the differences between datagrid, datalist and repeater in .net?

703


What does mean before a string in c#?

702


Why delegates are type safe in c#?

691


Explain about finalize method?

732


Why delegates are required?

714


Explain how can I get around scope problems in a try/catch?

672


How many bytes is an int?

680


What is unsigned int?

694