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

Is it possible to have a static indexer in c#?

0 Answers  


What is the difference between delegates and superdelegates?

0 Answers  


What is null in database?

0 Answers  


About Virtual functions and their use ?

13 Answers   MBITS, MMTS,


What are the ways to deploy an assembly?

1 Answers  






What is boolean conditions in c#?

0 Answers  


What is difference between virtual and override in c#?

0 Answers  


What is out in c#?

0 Answers  


explain the three services model commonly know as a three-tier application.

0 Answers   Siebel Systems,


What is difference between float and integer?

0 Answers  


How to parse a date time string?

0 Answers  


What is the difference between internal and protected in c#?

0 Answers  


Categories