Re: Encapsulation
- From: harborsparrow <pgpalmer@xxxxxxxxx>
- Date: Mon, 26 May 2008 19:00:02 -0700 (PDT)
On May 24, 12:07 am, Jon Harrop <j...@xxxxxxxxxxxxxxxxx> wrote:
I have two separate classes and would like the members of one class to have
access to the private members of another class. What is the idiomatic C#
solution to this?
I believe C++ would use "friends".
--
Dr Jon D Harrop, Flying Frog Consultancyhttp://www.ffconsultancy.com/products/?u
If you let both classes inherit from a third superclass, you can use
"protected" to let them see each other's data (I think). I would not
do that, however, without documenting it prominently.
.
- Follow-Ups:
- Re: Encapsulation
- From: Jon Harrop
- Re: Encapsulation
- References:
- Encapsulation
- From: Jon Harrop
- Encapsulation
- Prev by Date: Re: Why event handler first parameters are incorrect
- Next by Date: Re: using / Add a reference then using
- Previous by thread: Re: Encapsulation
- Next by thread: Re: Encapsulation
- Index(es):
Relevant Pages
|
Loading