Partager via


AdoDotNetConnectionProperties.Add, méthode (String, Object)

Ajoute une nouvelle propriété à la collection actuelle de propriétés de connexion.Déclenche l'événement PropertyChanged.

Espace de noms :  Microsoft.VisualStudio.Data.Framework.AdoDotNet
Assembly :  Microsoft.VisualStudio.Data.Framework (dans Microsoft.VisualStudio.Data.Framework.dll)

Syntaxe

'Déclaration
Public Overridable Sub Add ( _
    key As String, _
    value As Object _
)
public virtual void Add(
    string key,
    Object value
)
public:
virtual void Add(
    String^ key, 
    Object^ value
)
abstract Add : 
        key:string * 
        value:Object -> unit 
override Add : 
        key:string * 
        value:Object -> unit 
public function Add(
    key : String, 
    value : Object
)

Paramètres

Implémentations

IDictionary<TKey, TValue>.Add(TKey, TValue)

Exceptions

Exception Condition
ArgumentNullException

Le paramètre propertyName est nullune référence null (Nothing en Visual Basic).

NotSupportedException

La chaîne de connexion n'est pas extensible.

ArgumentException

La propriété existe déjà.

Sécurité .NET Framework

Voir aussi

Référence

AdoDotNetConnectionProperties Classe

Add, surcharge

Microsoft.VisualStudio.Data.Framework.AdoDotNet, espace de noms