类设计器支持分部类和分部方法。
向数据集的分部类文件中添加代码。
分部类型可能包含分部方法。
分部类必须派生自支持根元素的类型。
The partial class must derive from the type that backs the root element.
分部类型的两个部分中的签名必须匹配。
在分部类中,添加应用程序要求该页所具有的代码。
In the partial class, you add the code that your application requires for the page.
生成分部类,用于书写自定义代码,以避免被自动生成的代码覆盖。
Generates partial classes where custom code can be written and won't be overwritten.
分部方法通常被定义在一个分部类中,在常规的类文件中也可实现。
A partial method is usually defined in a partial class file and is optionally implemented in the regular class file.
使用此分部类,您可以将代码隐藏文件用作完整类的一部分,而无需显式声明控件。
This partial class enables your code-behind file to be used as part of a complete class without requiring you to declare the controls explicitly.
分部方法在分部类型的一个部分中定义它的签名,并在该类型的另外一个部分中定义它的实现。
A partial method has its signature defined in one part of a partial type, and its implementation defined in another part of the type.
请注意,在标记编译生成操作的默认行为下,您可以在代码隐藏端的分部类定义中将派生保留为空。
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.
请注意,在标记编译生成操作的默认行为下,您可以在代码隐藏端的分部类定义中将派生保留为空。
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.
应用推荐