Export (0) Print
Expand All

MergablePropertyAttribute.MergablePropertyAttribute Constructor

Initializes a new instance of the MergablePropertyAttribute class.

Namespace: System.ComponentModel
Assembly: System (in system.dll)

public MergablePropertyAttribute (
	bool allowMerge
)
public MergablePropertyAttribute (
	boolean allowMerge
)
public function MergablePropertyAttribute (
	allowMerge : boolean
)
Not applicable.

Parameters

allowMerge

true if this property can be combined with properties belonging to other objects in a Properties window; otherwise, false.

The following example marks a property as appropriate to merge. This code creates a new MergablePropertyAttribute, sets its value to MergablePropertyAttribute.Yes, and binds it to the property.


[MergableProperty(true)]
public int MyProperty {
   get {
      // Insert code here.
     return 0;
   }
   set {
      // Insert code here.
   }
}
   

/** @attribute MergableProperty(true)
 */

/** @property
 */
public int get_MyProperty()
{
    // Insert code here.
    return 0;
} //get_MyProperty

/** @property 
 */
public void set_MyProperty(int value)
{
    // Insert code here.
} //set_MyProperty

public MergableProperty(true)
function get MyProperty() : int{
   // Insert code here.
   return 0
}

function set MyProperty(value : int){
   // Insert code here.
}


Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft