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 / bakku pavan kumar
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 ? | 20 Yes | 0 No |
Post New Answer View All Answers
Why do we write system in c#?
What is the purpose of ienumerable in c#?
Can you inherit from multiple classes in c#?
Explane each and every methods of nterface Queue? Explain About performance issues on retrieving records
What is immutable in C#?
Are attributes inherited c#?
Is multiple inheritance possible in c#?
In which format you can pass the value in the sleep function?
Describe ways of cleaning up objects in c#.
What is data types in c#?
What is the purpose of a namespace?
What is using keyword?
Distinguish between the Debug class and Trace class with its functionality?
Explain the working of serialization?
Explain synchronous and asynchronous operations?