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 |
I have to create a windows application using C# .net to Modifiy the XML file. The application have to show the node and node value. plz help me.
What is difference between constants and readonly in c#?
What is typeof c#?
What's the difference between a static method and a non static method c#?
What are the steps to create an assembly and add it to the gac?
what is meant inheritance. can you exaplain what kind inhertance ussed in your project
Describe ways of cleaning up objects.
What is the use of jit ? Jit (just - in - time) is a compiler which converts msil code to
Is a c# interface the same as a c++ abstract class?
What are the different types of assembly?
Can a class inherit structure.
what is the purpose of using statement in c#