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 / 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 |
What is console writeline in c#?
f i give input like 1,1,4,5,6,1,2,5,4,1,2, then output should be like : 1-4, 2-2, 4-2, 5-1, 6-1 which means 1 occurs 4 times, 2 occurs 2 times like so.
Which is faster hashtable or dictionary?
What is using keyword in C#?
What is meant by desktop application?
What does get set mean in c#?
Can a static class contain non static members?
What is console read in c#?
When was c# created?
What are the collection types can be used in c#?
What is iqueryable in linq?
Can hashset contain duplicates c#?