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 / 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 |
Is it possible to have a static indexer in c#?
What is the difference between delegates and superdelegates?
What is null in database?
About Virtual functions and their use ?
What are the ways to deploy an assembly?
What is boolean conditions in c#?
What is difference between virtual and override in c#?
What is out in c#?
explain the three services model commonly know as a three-tier application.
What is difference between float and integer?
How to parse a date time string?
What is the difference between internal and protected in c#?