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 type is string in c#?
How does substring work in c#?
What .exe means?
What is ado net in c#?
What is list array in c#?
What is hierarchical inheritance in c#?
How many root nodes are there in an xml document?
What is difference between gridview and form view?
What is a generic method?
What is escape sequence in c#?
What is the file extension for c#?
What is a nullreferenceexception and how do I fix it?
Is learning c# hard?
What is the solution if you need to manipulate sets of items?
Explain the process of abstraction with an example?