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
What is firstordefault c#?
What is difference between hashtable and dictionary in c#?
What is the use of GC.KeepAlive Method?
Explain dataadapter.update method in .net?
How many types of constructors are there?
What is int parse in c#?
What is c# used for?
What is asp net in c#?
Why delegate is used in c#?
Why do you need boxing in c#?
What is delegation in oops?
How big is an int16?
Define c# i/o classes?
What is action in c# 3.5?
What is the difference between console application and windows application?