但这种代码可能难以理解,因此可以是使用部分类定义(partial class definition)。就是使用部分类定义,把类的定义放在多个文件中,如可以把字段、属性和构造函数放在一个文件中,而把方法放在另一个文件中。
基于24个网页-相关网页
At the top of the partial class definition for the form, add the following code.
在表单的partial类定义顶部,添加以下代码。
Note that under the default behavior of the markup compile build actions, you can leave the derivation blank in the partial class definition on the code-behind side.
请注意,在标记编译生成操作的默认行为下,您可以在代码隐藏端的分部类定义中将派生保留为空。
应用推荐