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
Define clr in .net?
Are string objects mutable or immutable?
Explain states of a thread in c#?
Why is main static in c#?
What is part of a method signature in c#?
Explain About sn.exe
Name some string escape sequences in c#.
Can destructors have access modifiers?
How do you clear a list in c#?
What is a int in c#?
What is difference between yielding and sleeping?
How to find methods of a assembly file (not using ILDASM)?
What is attribute c#?
Distinguish between a class and struct?
Why do we need generics?