EditorBrowsableAttribute クラス
アセンブリ: System (system.dll 内)
構文
<AttributeUsageAttribute(AttributeTargets.Class Or AttributeTargets.Struct Or AttributeTargets.Enum Or AttributeTargets.Constructor Or AttributeTargets.Method Or AttributeTargets.Property Or AttributeTargets.Field Or AttributeTargets.Event Or AttributeTargets.Interface Or AttributeTargets.Delegate)> _ Public NotInheritable Class EditorBrowsableAttribute Inherits Attribute
[AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Enum|AttributeTargets.Constructor|AttributeTargets.Method|AttributeTargets.Property|AttributeTargets.Field|AttributeTargets.Event|AttributeTargets.Interface|AttributeTargets.Delegate)] public sealed class EditorBrowsableAttribute : Attribute
[AttributeUsageAttribute(AttributeTargets::Class|AttributeTargets::Struct|AttributeTargets::Enum|AttributeTargets::Constructor|AttributeTargets::Method|AttributeTargets::Property|AttributeTargets::Field|AttributeTargets::Event|AttributeTargets::Interface|AttributeTargets::Delegate)] public ref class EditorBrowsableAttribute sealed : public Attribute
/** @attribute AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Enum|AttributeTargets.Constructor|AttributeTargets.Method|AttributeTargets.Property|AttributeTargets.Field|AttributeTargets.Event|AttributeTargets.Interface|AttributeTargets.Delegate) */ public final class EditorBrowsableAttribute extends Attribute
AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Enum|AttributeTargets.Constructor|AttributeTargets.Method|AttributeTargets.Property|AttributeTargets.Field|AttributeTargets.Event|AttributeTargets.Interface|AttributeTargets.Delegate) public final class EditorBrowsableAttribute extends Attribute
このクラスをビジュアル デザイナまたはテキスト エディタで使用すると、ユーザーに対して表示できるプロパティやメソッドを決定できます。たとえば、Visual Studio の IntelliSense エンジンは、この属性を使用して、メソッドまたはプロパティのどちらを表示するかを決定します。
EditorBrowsableAttribute 属性に適切な値を設定して、IntelliSense でコントロールのプロパティを非表示にする方法を次の例に示します。新しいアプリケーションを開き、コントロールに参照を追加し、そのコントロールのインスタンスを宣言した後で、IntelliSense はドロップダウン リスト ボックスに Age プロパティを表示しません。
Private ageval As Integer <EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)> _ Public Property Age() As Integer Get Return ageval End Get Set(ByVal Value As Integer) If Not ageval.Equals(Value) Then ageval = Value End If End Set End Property
int ageval; [EditorBrowsable(EditorBrowsableState.Never)] public int Age { get { return ageval; } set { if (!ageval.Equals(value)) { ageval = value; } } }
System.Attribute
System.ComponentModel.EditorBrowsableAttribute
プラットフォーム
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
- EditorBrowsableAttribute クラスのページへのリンク