Reputation: 2491
Is there a way to make each form, (all controls, all strings, all integers inside) to make accessible from each other form ?
Upvotes: 0
Views: 505
Reputation: 62265
You just need to implement it by yourself. There is no built-in mechanism.
Create global collection of forms objects (may be static
) and for every form define public
properties of the members you want to share with others.
That is.
Upvotes: 2
Reputation: 39059
There is, as the others pointed out, but do you really want to? You rarely want one form to be very dependent of another form - it can make your maintenance much harder. Figure out exactly what you need, and design the interfaces properly (perhaps you need a controller that knows how to control both forms?).
Upvotes: 0
Reputation: 148180
Access modifiers make the members of class accessible or non accessible from other classes. All form classes are public and accessible by other forms by default. The data member declared public are accessible through other forms(classes) and protected members are accessible by sub class. Study about access modifier could help you in making the required members accessible, Access Modifiers
Upvotes: 2