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 does break do in loop?
If I have more than one version of one assemblies, then how'll I use old version (how/where to specify version number?)in my application?
Can you create an instance of a static class?
Helo , Help Me , Help Me About : C# Windows Application - Network How To Manage IP Client's Accessiblity To The Internet Share concise Substitute , Minor ISA Server
What is the default value of decimal in c#?
Explain the difference between and xml documentation tag?
Can I fly with a loop recorder?
How many types of inheritance are there in c#?
What is the difference between as and is operators in c#?
Can I use ReaderWriterLock instead of Monitor.Enter/Exit for Threading?
How does return work in c#?
Explain the difference between proc. Sent by val and by sub?
Define MSIL, and how does it works? Why our developers need an appreciation of it if at all?
What is the xml document structure?
What is the purpose of namespace in c#?