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

What is delegate in c# interview questions?

699


What are some examples of desktop applications?

686


What are the namespace level elements?

681


What is hierarchical inheritance in c#?

667


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

671


Is overriding of a function possible in the same class?

671


What are some of the commonly used commands in sqlcommand?

686


What is session variable in c#?

762


What is a value type in c#?

696


What can be done with c#?

612


What is sqladapter c#?

732


What is the boxing and unboxing in c#?

675


What is javascriptserializer c#?

711


What is wpf c#?

661


Why do we need reflection in c#?

680