FOR EXAMPLE : CLASS Dotnet { }
creating object: Dotnet dn=new Dotnet();
NOW THE QUESTION IS WHICH IS CALLED AS OBJECT ?EITHER dn OR
new Dotnet() and CAN YOU PROVE YOUR ANSWER?????PLEASE REPLY...



FOR EXAMPLE : CLASS Dotnet { } creating object: Dotnet dn=new Dotnet(); NOW THE QUESTION IS WHICH ..

Answer / pavan7

new Dotnet(); is the object,and dn is the reference to that
object.Because,
i)
you know that REFERENCE TYPES are stored in MANAGED HEAP SO
new Dotnet(); is stored in MANAGED HEAP BUT dn is stored on
STACK MEMORY AREA.
ii)
AND,until and unless we use new keyword there is no any memory
allocation.so anything that associated with new keyword is
called as an OBJECT

WHAT WILL YOU SAY???????????
PLEASE COMMENT...........

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More C Sharp Interview Questions

I have to create a windows application using C# .net to Modifiy the XML file. The application have to show the node and node value. plz help me.

3 Answers   Merrill Lynch,


What is difference between constants and readonly in c#?

0 Answers  


What is typeof c#?

0 Answers  


What's the difference between a static method and a non static method c#?

0 Answers  


What are the steps to create an assembly and add it to the gac?

0 Answers  


what is meant inheritance. can you exaplain what kind inhertance ussed in your project

1 Answers  


Describe ways of cleaning up objects.

8 Answers   Wipro,


What is the use of jit ? Jit (just - in - time) is a compiler which converts msil code to

0 Answers  


Is a c# interface the same as a c++ abstract class?

0 Answers  


What are the different types of assembly?

0 Answers  


Can a class inherit structure.

4 Answers   IBM, Synechron,


what is the purpose of using statement in c#

0 Answers   Cognizant,


Categories