SqlCacheDependencyDatabaseCollection.Get Method

Definition

Returns the specified SqlCacheDependencyDatabaseCollection element.

Overloads

Get(Int32)

Returns the SqlCacheDependencyDatabaseCollection element at the specified index.

Get(String)

Returns the SqlCacheDependencyDatabaseCollection element with the specified name.

Get(Int32)

Returns the SqlCacheDependencyDatabaseCollection element at the specified index.

C#
public System.Web.Configuration.SqlCacheDependencyDatabase Get(int index);

Parameters

index
Int32

The index of the SqlCacheDependencyDatabaseCollection element to retrieve.

Returns

The SqlCacheDependencyDatabaseCollection element at the specified index.

Examples

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

C#
SqlCacheDependencyDatabase dbElement1 =
    sqlCdds.Get(0);

Remarks

A null reference (Nothing in Visual Basic) is returned if no element exists at the specified index.

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

Get(String)

Returns the SqlCacheDependencyDatabaseCollection element with the specified name.

C#
public System.Web.Configuration.SqlCacheDependencyDatabase Get(string name);

Parameters

name
String

The name of the SqlCacheDependencyDatabaseCollection element to retrieve.

Returns

The SqlCacheDependencyDatabaseCollection element with the specified name.

Examples

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

C#
SqlCacheDependencyDatabase dbElement3 =
  sqlCdds.Get("dataBaseElement");

Remarks

A null reference (Nothing in Visual Basic) is returned if no element exists with the specified name.

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1