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

Explain about c# language.

821


Why do we still see so much non-oo code written in c# today?

710


Why we use get and set method in c#?

707


Hi Friends, I am going through Siemens Interview Procedure from last 1+1/2 months. I went through 1 written + 2 Technical + 1 Managerial Round process after which I got call from HR informing that "you are selected and we would like to meet you for HR round". HR round was very nominal compared to MR. HR Round last for hardly 5 mins. They told me that you will get the final result on Friday. Still I have not received any feedback from them. Please help!!!

16906


What are the different types of assemblies available and their purpose?

702


What is the difference between func and action delegate?

717


Explain About .NET Framework

699


what are the differences between a class and structure

776


How does dependency injection work c#?

700


Can you instantiate a struct without using a new operator in c#?

752


What is hashtable in c# with example?

708


Explain manifest in c#.

736


What is class method?

676


What does the keyword “virtual” declare for a method or property?

748


What is the diff between the System.Array.CopyTo() and System.Array.Clone()?

790