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

From a versioning perspective, what are the drawbacks of extending an interface as opposed to extending a class?

1004


What is the default value of boolean variable?

1028


How do I create a multilanguage, single-file assembly?

973


What is console write in c#?

988


What is thread life cycle in c#?

1026


can you declare an override method to be static if the original method is not static?

1069


What are the two kinds of properties in c#.

993


What is an int c#?

916


How is a strongly-named assembly different from one that isn’t strongly-named?

1108


What is the name of c# compiler?

1200


What is a sealed class?

990


Suppose you have already existing application with Visual Studio 6 (VB 6, InterDev 6) and this application utilizes Windows 2000 COM+ transaction services. With this example how can you approach migrating this application to .NET?

955


Difference between abstract classes and interfaces

1051


Why do we use yield in c#?

977


Can you declare a class or a struct as constant?

1143