• Advertisement
Sign in to follow this  

C# More about classes

This topic is 3709 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

Hello again. I have new problem with classes. Its about scope.. I have class, that holds character info, str, dex, int etc. I have few forms, main and shop for example. How can i make object, that is visible EVERYwhere.. class props, money, exp, str,stamina... form1 class object = new class(); object.money = 100; ShopForm shopfrm = new ShopForm(); shopfrm.Show(); form2 object.money -= 10; I cant make it so, that form1 knows about these changes.. This has something to do with "out". I know, that i have to pass the object as reference, so i can edit THE object.. But how do i do that?

Share this post


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

  • Advertisement