Marton Korosi

Marton Korosi

  • NA
  • 14
  • 35.4k

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

Jun 27 2012 9:23 AM
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)