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
What is data adapter in c#?
Why is c# better than java?
What is value c#?
What is the purpose of static?
What is a interface in c#?
What is single dimensional array in c#?
What do you mean by hashtable c#?
What is data quality assurance?
What are constants in c#?
Why c# is called c sharp?
What is ienumerable <> in c#?
Is c# queue thread safe?
What is ildasm.exe used for?
How to use the sreamReader class to read form a text file?
What is the name of c# compiler?