MergablePropertyAttribute.AllowMerge プロパティ
アセンブリ: System (system.dll 内)

[プロパティ] ウィンドウ内で、プロパティを別のオブジェクトに属するプロパティと組み合わせることができる場合は true。それ以外の場合は false。

MyProperty が組み合わせることができるプロパティかどうかを確認する例を次に示します。最初に、次の方法で MyProperty の属性を取得します。
次に、myAttribute を AttributeCollection にある MergablePropertyAttribute の値に設定し、プロパティを組み合わせることができるかどうかを確認します。
' Gets the attributes for the property. Dim attributes As AttributeCollection = _ TypeDescriptor.GetProperties(Me)("MyPropertyProperty").Attributes ' Checks to see if the property is bindable. Dim myAttribute As MergablePropertyAttribute = _ CType(attributes(GetType(MergablePropertyAttribute)), _ MergablePropertyAttribute) If myAttribute.AllowMerge Then ' Insert code here. End If
// Gets the attributes for the property. AttributeCollection attributes = TypeDescriptor.GetProperties(this)["MyPropertyProperty"].Attributes; // Checks to see if the property is bindable. MergablePropertyAttribute myAttribute = (MergablePropertyAttribute)attributes[typeof(MergablePropertyAttribute)]; if(myAttribute.AllowMerge) { // Insert code here. }
// Gets the attributes for the property. AttributeCollection^ attributes = TypeDescriptor::GetProperties( this )[ "MyPropertyProperty" ]->Attributes; // Checks to see if the property is bindable. MergablePropertyAttribute^ myAttribute = dynamic_cast<MergablePropertyAttribute^>(attributes[ MergablePropertyAttribute::typeid ]); if ( myAttribute->AllowMerge ) { // Insert code here. }
// Gets the attributes for the property. AttributeCollection attributes = TypeDescriptor.GetProperties(this).get_Item ("MyPropertyProperty").get_Attributes(); // Checks to see if the property is bindable. MergablePropertyAttribute myAttribute = ((MergablePropertyAttribute)(attributes.get_Item (MergablePropertyAttribute.class.ToType()))); if (myAttribute.get_AllowMerge()) { // Insert code here. }
// Gets the attributes for the property. var attributes : AttributeCollection = TypeDescriptor.GetProperties(this)["MyPropertyProperty"].Attributes // Checks to see if the property is bindable. var myAttribute : MergablePropertyAttribute = MergablePropertyAttribute(attributes(MergablePropertyAttribute)) if(myAttribute.AllowMerge){ // Insert code here. }

Windows 98, Windows 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
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からMergablePropertyAttribute.AllowMerge プロパティを検索する場合は、下記のリンクをクリックしてください。

- MergablePropertyAttribute.AllowMerge プロパティのページへのリンク