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
What are the benefits of using the aggregate method in linq?
What are the access modifiers in c#?
List the different stages of a thread?
What is ado net in c#?
What is the difference between namespace and class in c#?
Can enum be null c#?
What is a streamwriter in c#?
Enlist all the components of an ado.net framework?
What is jit? What are the different types of jit?
What is a ienumerator?
What are partial types in c#?
What is the signature of a method?
Why do we use threads in c#?
In which way you can convert a value-type to a reference-type?
What are events in C#?