AttributeProviderAttribute コンストラクター

定義

AttributeProviderAttribute クラスの新しいインスタンスを初期化します。

オーバーロード

AttributeProviderAttribute(String)

指定した型名を使用して AttributeProviderAttribute クラスの新しいインスタンスを初期化します。

AttributeProviderAttribute(Type)

指定した型を使用して、AttributeProviderAttribute クラスの新しいインスタンスを初期化します。

AttributeProviderAttribute(String, String)

指定した型名とプロパティ名を使用して、AttributeProviderAttribute クラスの新しいインスタンスを初期化します。

AttributeProviderAttribute(String)

ソース:
AttributeProviderAttribute.cs
ソース:
AttributeProviderAttribute.cs
ソース:
AttributeProviderAttribute.cs

指定した型名を使用して AttributeProviderAttribute クラスの新しいインスタンスを初期化します。

public:
 AttributeProviderAttribute(System::String ^ typeName);
public AttributeProviderAttribute (string typeName);
new System.ComponentModel.AttributeProviderAttribute : string -> System.ComponentModel.AttributeProviderAttribute
Public Sub New (typeName As String)

パラメーター

typeName
String

指定する型の名前。

例外

typeNamenullです。

こちらもご覧ください

適用対象

AttributeProviderAttribute(Type)

ソース:
AttributeProviderAttribute.cs
ソース:
AttributeProviderAttribute.cs
ソース:
AttributeProviderAttribute.cs

指定した型を使用して、AttributeProviderAttribute クラスの新しいインスタンスを初期化します。

public:
 AttributeProviderAttribute(Type ^ type);
public AttributeProviderAttribute (Type type);
new System.ComponentModel.AttributeProviderAttribute : Type -> System.ComponentModel.AttributeProviderAttribute
Public Sub New (type As Type)

パラメーター

type
Type

指定する型。

例外

typenullです。

次のコード例では、 を使用してAttributeProviderAttribute、特定の型の IListSourceプロパティをマークDataSourceする方法を示します。 完全なコード一覧については、「方法: Windows フォーム コントロールで属性を適用する」を参照してください。

[Category("Data")]
[Description("Indicates the source of data for the control.")]
[RefreshProperties(RefreshProperties.Repaint)]
[AttributeProvider(typeof(IListSource))]
public object DataSource
{
    get
    {
        return this.dataGridView1.DataSource;
    }

    set
    {
        this.dataGridView1.DataSource = value;
    }
}
<Category("Data"), _
Description("Indicates the source of data for the control."), _
RefreshProperties(RefreshProperties.Repaint), _
AttributeProvider(GetType(IListSource))> _
Public Property DataSource() As Object
    Get
        Return Me.dataGridView1.DataSource
    End Get

    Set(ByVal value As Object)
        Me.dataGridView1.DataSource = value
    End Set
End Property

こちらもご覧ください

適用対象

AttributeProviderAttribute(String, String)

ソース:
AttributeProviderAttribute.cs
ソース:
AttributeProviderAttribute.cs
ソース:
AttributeProviderAttribute.cs

指定した型名とプロパティ名を使用して、AttributeProviderAttribute クラスの新しいインスタンスを初期化します。

public:
 AttributeProviderAttribute(System::String ^ typeName, System::String ^ propertyName);
public AttributeProviderAttribute (string typeName, string propertyName);
new System.ComponentModel.AttributeProviderAttribute : string * string -> System.ComponentModel.AttributeProviderAttribute
Public Sub New (typeName As String, propertyName As String)

パラメーター

typeName
String

指定する型の名前。

propertyName
String

属性を取得するプロパティの名前。

例外

propertyNamenull です。

こちらもご覧ください

適用対象