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

'宣言
Private Sub Add ( _
    item As DataSource _
) Implements ICollection(Of DataSource).Add
'使用
Dim instance As DataSourceManager
Dim item As DataSource

CType(instance, ICollection(Of DataSource)).Add(item)
void ICollection<DataSource>.Add(
    DataSource item
)
private:
virtual void Add(
    DataSource^ item
) sealed = ICollection<DataSource^>::Add
JScript does not support explicit interface implementations.

Parameters

Implements

ICollection<T>.Add(T)

Exceptions

Exception Condition
InvalidOperationException

Always thrown.

Remarks

Implements the Add method.

注意

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.

Permissions

See Also

Reference

DataSourceManager Class

DataSourceManager Members

Microsoft.VisualStudio.Data Namespace