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

List the major built-in objects in asp.net?

1000


How does ASP.NET framework maps client side events to Server side events.?

1101


List all templates of the repeater control.

1087


Explain form level validation and field level validation?

1015


What is the difference between page.registerclientscriptblock and page.registerstartupscript?

841


Describe the disadvantage of cookies.

1030


What are the advantages and limitations of query string?

1053


What is the use of data set in asp.net?

956


Can we have 2 web config files?

970


What do you understand from custom control?

1123


What symbol would you use to denote, the start of a code block in aspx views?

960


Explain how to prepare culture-specific formatting in .net.

968


What is a nested masterpage in asp.net 2.0? Can there be a master page inside a masterpage?

898


What is the significance of proxy user?

1087


What are the differnt types of handler in ASP.NET?

980