SqlCacheDependencyDatabaseCollection.Add Method (SqlCacheDependencyDatabase)

 

Adds a SqlCacheDependencyDatabase object to the collection.

Namespace:   System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)

Public Sub Add (
	name As SqlCacheDependencyDatabase
)

Parameters

name
Type: System.Web.Configuration.SqlCacheDependencyDatabase

The name of the SqlCacheDependencyDatabase object to add to the collection.

Exception Condition
ConfigurationException

The SqlCacheDependencyDatabase object already exists in the collection or the collection is read only.

Each SqlCacheDependencyDatabase in the collection must have a unique name.

The following code example shows how to use the Add method.

Dim dbElement As SqlCacheDependencyDatabase = _
New SqlCacheDependencyDatabase( _
"dataBase", "dataBaseElement", 500)
sqlCdds.Add(dbElement)

.NET Framework
Available since 2.0
Return to top
Show: