MergablePropertyAttribute クラスの新しいインスタンスを初期化します。
Public Sub New( _
ByVal allowMerge As Boolean _)
[C#]
public MergablePropertyAttribute(
boolallowMerge);
[C++]
public: MergablePropertyAttribute(
boolallowMerge);
[JScript]
public function MergablePropertyAttribute(
allowMerge : Boolean);
パラメータ
- allowMerge
[プロパティ] ウィンドウ内で、プロパティを別のオブジェクトに属するプロパティと組み合わせることができる場合は true 。それ以外の場合は false 。
使用例
プロパティを組み合わせできるとしてマークする例を次に示します。このコードは、新しい MergablePropertyAttribute を作成し、その値を MergablePropertyAttribute.Yes に設定してから、その属性をプロパティに関連付けます。
<MergableProperty(True)> _
Public Property MyProperty() As Integer
Get
' Insert code here.
Return 0
End Get
Set
' Insert code here.
End Set
End Property
[C#]
[MergableProperty(true)]
public int MyProperty {
get {
// Insert code here.
return 0;
}
set {
// Insert code here.
}
}
[C++]
public:
[MergableProperty(true)]
__property int get_MyProperty() {
// Insert code here.
return 0;
}
__property void set_MyProperty( int value ) {
// Insert code here.
}
[JScript]
public MergableProperty(true)
function get MyProperty() : int{
// Insert code here.
return 0
}
function set MyProperty(value : int){
// Insert code here.
}
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
MergablePropertyAttribute クラス | MergablePropertyAttribute メンバ | System.ComponentModel 名前空間 | MergablePropertyAttribute