Jump to content
  • Advertisement
Sign in to follow this  
Jouei

C# class question

This topic is 3584 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am currently Writing a gui for C# and XNA but the question i have is more of a C# general question. I have a Gui control witch will have child controls and the child controls need to be draw based on the Parent gui's postion what i want to know is if there is a friend class associate in c# or if there is any way i can make it so the Parent gui can access a private member. This is so that only one Draw is avaliable to the user and the Specal Draw function is reserved only for the Gui Control type that have child controls. Well i hope that made some sence any and all response are welcomed and apprecated. Regards Jouei.

Share this post


Link to post
Share on other sites
Advertisement
No, C# doesn't have "friend" (thankfully, imo). Assuming you're writing this as a Class Library, "internal" is used for stuff like this. Internal being public, but only within that assembly.

internal (C#)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!