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 difference between write and writeline in c#?
Explain nullable types in c#?
What is the default value of date?
What is the use of iqueryable in c#?
What are the Types of instancing properties and explain each. Explain the difference between multiuse,singleuse and globalmultiuse and which is default
Why var is used in c#?
Which is faster dictionary or list?
What is the xml document structure?
How to use session under class file of APP_Code folder?
Can abstract class have private constructor c#?
How do I do implement a assert?
What is a service layer c#?
What are the advantages of using c#?
What does break do in loop?
Explain about ODP.net