MergablePropertyAttribute(Boolean) 생성자
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
MergablePropertyAttribute 클래스의 새 인스턴스를 초기화합니다.
public:
MergablePropertyAttribute(bool allowMerge);
public MergablePropertyAttribute(bool allowMerge);
new System.ComponentModel.MergablePropertyAttribute : bool -> System.ComponentModel.MergablePropertyAttribute
Public 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.
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