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...

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Why are c# strings immutable?

495


What can be done with c#?

436


What is difference between events and delegates?

484


What is a decimal in c#?

496


How do I link two windows forms in c#?

469






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

539


How do I create a dbml file?

475


What is linq c#?

498


What does f mean in c#?

507


What is the default scope of a class in c#?

478


What does char mean in c#?

496


What is before string in c#?

489


What are the Types of JIT and what is econo-JIT

792


Explain About Virtual functions and their use.

550


Is c and c# the same?

496