DataConnectionProperties.AddProperty メソッド (String, Type, array<Attribute )

動的に、このデータ接続のプロパティのインスタンスで認識されるプロパティのコレクションに新しいプロパティを追加します。

名前空間:  Microsoft.VisualStudio.Data.Framework
アセンブリ:  Microsoft.VisualStudio.Data.Framework (Microsoft.VisualStudio.Data.Framework.dll 内)

構文

'宣言
Protected Function AddProperty ( _
    name As String, _
    type As Type, _
    ParamArray attributes As Attribute() _
) As PropertyDescriptor
protected PropertyDescriptor AddProperty(
    string name,
    Type type,
    params Attribute[] attributes
)
protected:
PropertyDescriptor^ AddProperty(
    String^ name, 
    Type^ type, 
    ... array<Attribute^>^ attributes
)
member AddProperty : 
        name:string * 
        type:Type * 
        attributes:Attribute[] -> PropertyDescriptor 
protected function AddProperty(
    name : String, 
    type : Type, 
    ... attributes : Attribute[]
) : PropertyDescriptor

パラメーター

  • type
    型 : System.Type
    プロパティのデータ型です。
  • attributes
    型 : array<System.Attribute[]
    プロパティにアタッチする一連の属性。

戻り値

型 : System.ComponentModel.PropertyDescriptor
新しく追加されたプロパティ記述子。

例外

例外 条件
ArgumentNullException

name や type のパラメーターは nullnull 参照 (Visual Basic では Nothing)です。

ArgumentException

指定したプロパティが存在します。

.NET Framework セキュリティ

  • 直前の呼び出し元に対する完全な信頼。このメンバーは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。

参照

関連項目

DataConnectionProperties クラス

AddProperty オーバーロード

Microsoft.VisualStudio.Data.Framework 名前空間

RemoveProperty