class MyFormTemplate{
} ;
class abcd: public System:: Windows :: Forms :: Form {
//自己建的class不能繼承
// error C3625: 'abcd': 不可以從 Managed 型別 'System::Windows::Forms::Form' 中衍生
// Unmanaged 型別
// 1>c:\...\system.windows.forms.dll : 請參閱 'System::Windows::Forms::Form' 的宣告
...
} ;
//public ref class Form1 : public System::Windows::Forms::Form 這是原來的
public ref class Form1 : public MyFormTemplate
{
//error C2811: 'test::Form1' : 無法從 'MyFormTemplate' 繼承,ref 類別
// 只能從 ref 類別或介面類別 繼承
...
} ;
Y2xhc3MgTXlGb3JtVGVtcGxhdGV7Cn07CgpjbGFzcyBhYmNkOnB1YmxpYyBTeXN0ZW06OldpbmRvd3M6OkZvcm1zOjpGb3JteyAgCgkvL+iHquW3seW7uueahGNsYXNz5LiN6IO957m85om/CiAgICAgICAgLy8gIGVycm9yIEMzNjI1OiAnYWJjZCc6IOS4jeWPr+S7peW+niBNYW5hZ2VkIOWei+WIpSAnU3lzdGVtOjpXaW5kb3dzOjpGb3Jtczo6Rm9ybScg5Lit6KGN55SfIAogICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgICBVbm1hbmFnZWQg5Z6L5YilCiAgICAgICAgLy8gIDE+YzpcLi4uXHN5c3RlbS53aW5kb3dzLmZvcm1zLmRsbCA6IOiri+WPg+mWsSAnU3lzdGVtOjpXaW5kb3dzOjpGb3Jtczo6Rm9ybScg55qE5a6j5ZGKCiAgLi4uCn07Ci8vcHVibGljIHJlZiBjbGFzcyBGb3JtMSA6IHB1YmxpYyBTeXN0ZW06OldpbmRvd3M6OkZvcm1zOjpGb3JtIOmAmeaYr+WOn+S+hueahApwdWJsaWMgcmVmIGNsYXNzIEZvcm0xIDpwdWJsaWMgTXlGb3JtVGVtcGxhdGUKewogICAgICAgIC8vZXJyb3IgQzI4MTE6ICd0ZXN0OjpGb3JtMScgOiDnhKHms5Xlvp4gJ015Rm9ybVRlbXBsYXRlJyDnubzmib/vvIxyZWYg6aGe5YilIAogICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgICAgICAgICDlj6rog73lvp4gcmVmIOmhnuWIpeaIluS7i+mdoumhnuWIpSDnubzmib8KICAuLi4KfTs=