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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is c# a keyword?

693


What does string intern do?

675


What is difference between list and dictionary in c#?

656


How do you declare a method in c#?

672


How would you describe encapsulation in c#?

678


Does a loop recorder have to be removed?

796


What is an actual parameter?

664


What are floating point numbers?

674


Do vs while c#?

672


What do you mean by stack and heap in c#?

667


What is the difference between ienumerable and enumerator?

663


What is iformatprovider in c#?

683


How much time will it take to learn unity?

679


Is null == null c#?

647


what is IComparable

771