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 cache memory in c#?
How many types of constructor are there in c#?
What is the function of .IsDescendent()?
Why are strings immutable in c#?
Explain what is the smallest unit of execution in .net?
Explain about ODP.net
What is linq c#?
Why linq is having select clause at the end?
What is the use of dll file in c#?
Define acid rule of thumb for transactions in c#.
What's the difference between class and object?
What is lazy loading and eager loading in c#?
What is overloading with example?
Can a sealed class be used as a base class?
Difference between StackPanel and RelativePanel ?