suppose we have two object;obj1 and obj2
can we assign obj2 to one1;
and if yes; then after assigning suppose we delete obj2
then obj1 will retain obj2 value or not.
Answers were Sorted based on User's Feedback
Very tricky question, perhaps i would like to answer this
one with small coding.
Employee e1 = new Employee('mahesh','Software');
Employee e2 = e1;
e1 = null;
console.writeline(e2.FirstName);
Answer: We can assign the reference of the object to other
object. since both e1 and e2 refers to the same memory
location for the empllyee object. If we change the e1 then
refernce to memory of e1 will get deleted but e2 stil refers
to the same memory location Certainly it will work. and
retain the value.
Thanks And Regards
Mahesh KOtekar
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / jitender
we can assign the refrence of the object to other object.
since both object have the same memory . if we change the 1
obj then refrence to memeory of 1 obj will get deleted but 2
obj still refers to the same memory location certantily it
will work.
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / masthan
see this example
parentclass obj1=new parentclass();
childclass obj2=obj1;//assign object to the reference of
childclass.here both obj1 and obj2 refer same memory
location.
obj1=null;//here obj1 losts the memory
console.write(obj2);//it refers same memory location
| Is This Answer Correct ? | 0 Yes | 0 No |
Explain what are the advantages of asp.net mvc framework? : asp.net mvc
what is view stat? how it is use.
Difference between ByVal and ByRef?
How do you handle session management in ASP.NET and how do you implement them. How do you handle in case of SQLServer mode ?
What combination of methods are used to improve the speed of the fill() method of the DataAdapter? a) BeginFillData() and EndFillData() b) StartFillData() and EndFillData() c) BeginLoadData() and EndLoadData() d) StartLoadData() and EndLoadData()
2 Answers Syntax Softtech, winfoware,
Why Global.asax is used?
What is the difference between Server.Transfer and Response.Redirect?
What is the difference between user control an custom control?
About CLS and CTS ?
What are Http handler ?
6 Answers Accenture, BirlaSoft, Satyam, Syntel,
Disable Session State at the Page Level
What is session tracking & methods?
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)