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 a verbatim string literal and why do we use it?
Does constructor return any value in c#?
what are the different ways to cleaning up objects?
Is concurrent queue thread safe?
Is xml tags are case sensitive?
What is the difference between abstract class and interface in c#?
Can an int be negative c#?
Why do you call it a process? What’s different between process and application in .net, not common computer usage, terminology?
What is alias in c#?
What is Asynchronous call and how it can be implemented using delegates?
Why main is static in c#?
What is the Difference between directcast and ctype?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)