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

Can an exception be thrown from a catch block?

1036


Is it possible to have different access modifiers on the get/set methods of a property in c#?

998


Are c# strings null terminated?

1068


What do you mean by a windows process in regards to memory allocation?

976


Explain publishers and subscribers in events.

966


What does readonly mean in c#?

1004


What is parsing?

939


What is a cshtml file?

1109


What is a byte in c#?

991


What is uint16?

934


What is the difference between string and string in c#?

995


What is function and method in c#?

1009


Enlist some of the properties of a thread class?

933


What is generic types in c#?

951


What is the difference between gettype and typeof in c#?

919