1
Answer

C++'s 'friend' like solution in c#?

Marton Korosi

Marton Korosi

12y
1.3k
1
HI!

My problem is:
I have 2 classes. A Form class called MainForm and GamePlayManager class. 
MainForm handles graphics and GamePlayManager handles the logic beyond graphics.
I separeted them into 2 classes because I don't want to mingle them into one (I think it would be a nasty solution).

question:

How should I implement them, to access the classes of each other?
I think public, and internal modifiers would be nasty solution. Setter and getter would be too elaborate.
In c++ there is friend modifier, however there is no friend in c#. 
What is the solution for my problem?

thanks, in advance
Martin
Answers (1)