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 we extend static class in c#?

963


What is the meaning of 0 in c#?

1052


What is the difference between “finalize” and “finally” methods in c#?

987


What is the difference between dynamic and var in c#?

983


What is an example of a delegate?

1007


What Is A Multicast Delegate?

1121


Why References are stored on heap and variables on stack?

990


Is array reference type in c#?

934


What are console applications used for?

968


Explain types of comment in c# with examples

1008


What is the difference between serialization and deserialization in c#?

1121


What is parameter c#?

1116


Why do you call it a process? What’s different between process and application in .net, not common computer usage, terminology?

1049


Why are mutable structs evil?

1045


What is an assembly in .net?

1045