Partager via


DataSourceManager.ICollection<DataSource>.Add Method

Adds a data source to the DDEX data source collection.

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

Syntax

'Déclaration
Private Sub Add ( _
    item As DataSource _
) Implements ICollection(Of DataSource).Add
void ICollection<DataSource>.Add(
    DataSource item
)
private:
virtual void Add(
    DataSource^ item
) sealed = ICollection<DataSource^>::Add
private abstract Add : 
        item:DataSource -> unit 
private override Add : 
        item:DataSource -> unit 
JScript does not support explicit interface implementations.

Parameters

Implements

ICollection<T>.Add(T)

Exceptions

Exception Condition
InvalidOperationException

Always thrown.

Remarks

Implements the Add method.

Notes

This method is read-only for clients and therefore throws an InvalidOperationException if used in client code. Rather, the implementation reads from the registry and populates the collection.

.NET Framework Security

See Also

Reference

DataSourceManager Class

Microsoft.VisualStudio.Data Namespace