P
Paul Cheetham
Hi,
I am writing an application with a large number of various classes, and
I want some of them to have Friend access to protected members of other
classes.
i.e. I want class A to have access to internal members of Class B
In C++ this was simple, as in the definition for class B, I would
declare calss A as a friend.
Seeing that C# had a friend keyword I thought this was going to be easy,
only to discover, that in typical Microsoft style, the friend keyword
has been changed to mean something completely different!
The only option I have come up with so far is to make public anything I
need to access from another class, but this doesn't really solve my
problem, as I want to make sure these functions can only be accessed by
the classes I specify.
Can anyone tell me how I can achieve the desired results please?
Thankyou in advance.
Paul Cheetham.
I am writing an application with a large number of various classes, and
I want some of them to have Friend access to protected members of other
classes.
i.e. I want class A to have access to internal members of Class B
In C++ this was simple, as in the definition for class B, I would
declare calss A as a friend.
Seeing that C# had a friend keyword I thought this was going to be easy,
only to discover, that in typical Microsoft style, the friend keyword
has been changed to mean something completely different!
The only option I have come up with so far is to make public anything I
need to access from another class, but this doesn't really solve my
problem, as I want to make sure these functions can only be accessed by
the classes I specify.
Can anyone tell me how I can achieve the desired results please?
Thankyou in advance.
Paul Cheetham.