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

What is private readonly in c#?

907


What is the difference between a field and a property in c#?

893


Explain about c# language.

1014


How to use delegates with events?

958


What is the difference between ienumerable and icollection?

882


Explain about ODP.net

1196


Can a static class have a constructor c#?

867


Can a struct be null?

873


Why to use “finally” block in c#?

1035


Explain boxing and unboxing in c#?

877


What is data binding c#?

878


Explain concurrency with aop?

919


Why do we need to serialize data?

845


Can I fly with a loop recorder?

873


Explain copy constructor?

1108