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

Is there any way to access private memebers of an object
from another object?

Answer Posted / mohit jethva

You need to create a property with private field and make
property as public so you can access private field using
public property in other object.

eg.

private int _ID;

public int ID
{
get{return value;}
set{_ID = value;}
}

Is This Answer Correct ?    10 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

In how many ways you can overload a method?

1061


What do you mean by abstract class in c#?

966


What is a property c#?

1012


What is Reflection in .NET? Namespace? How will you load an assembly which is not referenced by current assembly?

975


How do I create a .exe file?

1007


What can you do as a .net developer?

938


Is unity object oriented?

921


What is difference between ienumerable and list?

979


Can I define my own exceptions?

877


What is single dimensional array in c#?

937


What are the types of constructors?

917


What is the difference between new and override in c#?

998


Why do we need interface in c#?

997


What is difference between const and static in c#?

986


what is difference between destruct or and garbage collection ?

944