Partager via


DataSourceManager.ICollection<DataSource>.Remove Method

Removes a data source from the DDEX data source collection.

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

Syntax

'Declaration
Private Function Remove ( _
    item As DataSource _
) As Boolean Implements ICollection(Of DataSource).Remove
bool ICollection<DataSource>.Remove(
    DataSource item
)
private:
virtual bool Remove(
    DataSource^ item
) sealed = ICollection<DataSource^>::Remove
private abstract Remove : 
        item:DataSource -> bool  
private override Remove : 
        item:DataSource -> bool
JScript does not support explicit interface implementations.

Parameters

Return Value

Type: System.Boolean
Returns true if the data source was found and successfully removed; otherwise returns false.

Implements

ICollection<T>.Remove(T)

Exceptions

Exception Condition
InvalidOperationException

Always thrown.

Remarks

Implements the Remove method.

Note

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