MergablePropertyAttribute(Boolean) 构造函数  
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 MergablePropertyAttribute 类的新实例。
public:
 MergablePropertyAttribute(bool allowMerge);public MergablePropertyAttribute (bool allowMerge);new System.ComponentModel.MergablePropertyAttribute : bool -> System.ComponentModel.MergablePropertyAttributePublic Sub New (allowMerge As Boolean)参数
- allowMerge
- Boolean
如果该属性可以与“属性”窗口中属于其他对象的属性进行组合,则为 true;否则为 false。
示例
以下示例将属性标记为适合合并。 此代码创建新的 MergablePropertyAttribute,将其值设置为 MergablePropertyAttribute.Yes,并将其绑定到 属性。
public:
   [MergableProperty(true)]
   property int MyProperty 
   {
      int get()
      {
         // Insert code here.
         return 0;
      }
      void set( int value )
      {
         // Insert code here.
      }
   }
[MergableProperty(true)]
public int MyProperty {
   get {
      // Insert code here.
     return 0;
   }
   set {
      // Insert code here.
   }
}
<MergableProperty(True)> _    
Public Property MyProperty() As Integer
    Get
        ' Insert code here.
        Return 0
    End Get
    Set
        ' Insert code here.
    End Set 
End Property