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


Please Help Members By Posting Answers For Below Questions

How many types of interface are there in c#?

582


Why is aws serverless?

586


How to find the current application file path while runtime?

581


What is the difference between abstract class and interface in c#?

596


What are PE(Portable Executable)?

612






How do you achieve polymorphism in c#?

577


What are strong name assemblies?

642


What are strongly typed objects?

576


Can derived classes have greater accessibility than their base types?

625


Ho we can see assembly information?

594


What is the difference between double and decimal in c#?

552


What is an arraylist in c#?

695


Why cannot you specify the accessibility modifier for methods inside the interface?

574


what is the scope of anonymous type ?

658


What is c# windows form application?

583