如何让每个表单相互访问 [英] How to make each form accessible to each other

查看:26
本文介绍了如何让每个表单相互访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法让每个表单(所有控件、所有字符串、里面的所有整数)都可以从其他表单访问?

Is there a way to make each form, (all controls, all strings, all integers inside) to make accessible from each other form ?

推荐答案

访问修饰符使类的成员可以从其他类访问或不可访问.默认情况下,所有表单类都是公共的并且可以被其他表单访问.声明为 public 的数据成员可以通过其他形式(类)访问,受保护的成员可以通过子类访问.研究访问修饰符可以帮助您使所需的成员可访问,访问修饰符

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

这篇关于如何让每个表单相互访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆