What needs to be done so that I can work with this class and it was visible in the Form1 class?
- onemake the code text. - rdorn
|
1 answer
Since Class1 does not have non-static properties that store the state of the instance, all methods can be declared public static , and they will be accessible from Form1 via Class1.dead() and Class1.check() .
If in Class1 you still need to store a state that is changed by a call to public methods, then you only need to declare a property or variable of type Class1 in Form1 and set its value to MyProperty = new Class1() . Then you can do this: MyProperty.check() .
|
