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 master page in asp net c#?
What is an abstract class c#?
What is the use of thread join in c#?
What is the difference between static class and sealed class in c#?
What is private and shared assembly?
Describe the parts of assembly.
What are the various components in crystal reports?
Why do we use virtual methods in c#?
Does main have to be static c#?
Explain jagged arrays in c#?
What is part of a method signature in c#?
What is the difference between disposing of () and finalize() methods in c#?
Why do we use ienumerable in c#?
How do I make a dll in c#?
What is verbatim string?