Re: Encapsulation
- From: Jon Harrop <jon@xxxxxxxxxxxxxxxxx>
- Date: Sat, 24 May 2008 22:43:49 +0100
Arne Vajhøj wrote:
Jon Harrop 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".
The typical C# solution would be to put the classes in same
assembly and use "internal" accessibility.
That only restricts accessibility to the million lines of other code that
happens to be in the same assembly, which is such a weak constraint as to
be of no practical use.
--
Dr Jon D Harrop, Flying Frog Consultancy
http://www.ffconsultancy.com/products/?u
.
- Follow-Ups:
- Re: Encapsulation
- From: Arne Vajhøj
- Re: Encapsulation
- References:
- Encapsulation
- From: Jon Harrop
- Re: Encapsulation
- From: Arne Vajhøj
- Encapsulation
- Prev by Date: Re: Parser Generator for C#?
- Next by Date: Re: Encapsulation
- Previous by thread: Re: Encapsulation
- Next by thread: Re: Encapsulation
- Index(es):
Loading