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

If you want to convert a base type to a derived type, what type of conversion do you use?

686


What is a framework in c#?

684


What is namespace in oops?

676


How many types of namespaces available in version4?

714


What are the 2 types of data types available in c#?

689


How do I trim a space in c#?

659


What is the use of console readkey ()?

761


Does unity require coding?

757


List some of the common data providers for ado.net framework?

646


Will the following code compile and run?

750


Are private members inherited in c#?

772


What does return do in unity?

728


What is #region in c#?

694


What is a decimal in c#?

722


Why abstract class can not be instantiated?

656