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

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / satya

in Dotnet dn=new Dotnet(); here Dotnet dn creates a
reference variable(LHS) and new Dotnet(); creates an object.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Sharp Interview Questions

i want display a given number into Rupees Format Like Given number is : 156735 my Expected output is 1,56,735. how to display?

6 Answers  


Explain the working of serialization?

0 Answers  


Explain dataadapter.update method in .net?

0 Answers  


Can derived classes have greater accessibility than their base types?

0 Answers  


Please explain value types and reference types used in c#?

0 Answers  






What is the Difference between imperative and interrogative code?

2 Answers   Wipro,


Why reflection is used in c#?

0 Answers  


i am using windows authentication for c#.net remoting with iis.I uncheck the anonymous access option in directory security.when my client requests the server it returns 401:unauthorized error.How can I resolve the exception ? Please send me the reply as early as possible.

1 Answers  


What is thread life cycle in c#?

0 Answers  


Explain what are three test cases you should go through in unit testing?

0 Answers  


What?s the difference between // comments, /* */ comments and /// comments?

2 Answers   Intel, Visual Soft,


can we access main() using objects?

1 Answers   ssinformatics,


Categories