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 are the authentication types in asp.net?

1050


What is the mvc model?

1007


What are the advantages and limitations of query string?

1046


What is the web.config file in asp?

1161


Describe the Server Control Events of ASP.NET?

1180


If I am developing an application that must accomodate multiple security levels though secure login and my asp.net web application is spanned across three web-servers (using round-robin load balancing). What would be the best approach to maintain login-in state for the users?

1082


What is difference between asp.net and asp?

1040


Explain what are delegates?

1100


Is global asax mandatory?

989


What is cross page posting? How is it done?

959


What is Web API Routing?

1165


What are themes and skins in 2.0, explain usage scenario?

938


What is cookieless session id explain in brief?

1037


What will happen if the server confugration file and the application confugration file have different values for sassion state ASP.NET?

1227


How can you handle unmanaged code exceptions in asp.net?

1090