Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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...



FOR EXAMPLE : CLASS Dotnet { } creating object: Dotnet dn=new Dotnet(); NOW THE QUESTION IS WHICH ..

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

Post New Answer

More C Sharp Interview Questions

What is a verbatim string literal and why do we use it?

0 Answers  


Does constructor return any value in c#?

0 Answers  


what are the different ways to cleaning up objects?

2 Answers   Wipro,


Is concurrent queue thread safe?

0 Answers  


Is xml tags are case sensitive?

0 Answers  


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

0 Answers  


Can an int be negative c#?

0 Answers  


Why do you call it a process? What’s different between process and application in .net, not common computer usage, terminology?

0 Answers  


What is alias in c#?

0 Answers  


What is Asynchronous call and how it can be implemented using delegates?

0 Answers  


Why main is static in c#?

0 Answers  


What is the Difference between directcast and ctype?

1 Answers   Wipro,


Categories