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

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.

Answer Posted / mahesh kotekar

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the used of "ispostback" property?

1195


How to display Alert in ASP.NET

1256


What is content page in asp net?

1001


Differentiate between Server.Transfer and Response.Redirect with functionality? Why we can choose one over the other?

1252


How to disable cut, copy and paste in TextBox using jQuery in asp.net?

1255


What is a page life cycle? What are the events in a page life cycle?

940


Explain how does asp page work?

1068


Explain what does wsdl stand for?

1237


What is runat?

1114


Contrast oop and soa. What are tenets of each16. How does the xmlserializer work? What acl permissions does a process using it require?

1036


What is caching? What are different ways of caching in asp.net?

1392


Tell me how asp.net mvc differs from asp.net web forms? : asp.net mvc

1233


Why we use content place holder in asp.net?

1093


Can you explain autopostback?

1039


Explain server-side scripting and client-side scripting.

980