MergablePropertyAttribute(Boolean) Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the MergablePropertyAttribute class.
public:
MergablePropertyAttribute(bool allowMerge);
public MergablePropertyAttribute (bool allowMerge);
new System.ComponentModel.MergablePropertyAttribute : bool -> System.ComponentModel.MergablePropertyAttribute
Public Sub New (allowMerge As Boolean)
Parameters
- allowMerge
- Boolean
true
if this property can be combined with properties belonging to other objects in a Properties window; otherwise, false
.
Examples
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.
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
Applies to
See also
Spolupráca s nami v službe GitHub
Zdroj tohto obsahu nájdete v službe GitHub, kde môžete vytvárať a skúmať problémy a žiadosti o prijatie zmien. Ďalšie informácie nájdete v našom sprievodcovi prispievateľom.