Freigeben über


DataConnectionProperties.AddProperty-Methode (String, Type, array<Attribute[])

Fügt dynamisch der Auflistung neue Eigenschaft von Eigenschaften hinzu, die direkt von dieser Datenverbindungseigenschafteninstanz erkannt werden.

Namespace:  Microsoft.VisualStudio.Data.Framework
Assembly:  Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)

Syntax

'Declaration
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

Parameter

  • name
    Typ: String

    Der Eigenschaftenname.

  • type
    Typ: Type

    Der Datentyp der Eigenschaft.

  • attributes
    Typ: array<Attribute[]

    Ein Satz von Attributen, um der Eigenschaft angefügt werden.

Rückgabewert

Typ: PropertyDescriptor
Der ein der neu hinzugefügten Eigenschaft.

Ausnahmen

Ausnahme Bedingung
ArgumentNullException

Die name oder type sind Parameter nullein Nullverweis (Nothing in Visual Basic).

ArgumentException

Die angegebene Eigenschaft ist bereits vorhanden.

.NET Framework-Sicherheit

Siehe auch

Referenz

DataConnectionProperties Klasse

AddProperty-Überladung

Microsoft.VisualStudio.Data.Framework-Namespace

RemoveProperty