SqlCacheDependencyDatabase.Name Property

Definition

Gets or sets the name of the database.

C#
[System.Configuration.ConfigurationProperty("name", IsKey=true, IsRequired=true)]
[System.Configuration.StringValidator(MinLength=1)]
public string Name { get; set; }

Property Value

A string that specifies the name used by SqlCacheDependencyDatabase to identify the database.

Attributes

Examples

The following code example shows how to use the Name property.

C#

// Get the current Name property value.
string nameValue = sqlCdd.Name;

// Set the Name for this configuration element.
sqlCdd.Name = "ConfigElementName";

Remarks

The Name property allows you to programmatically access and modify the name attribute of an add element of the databases node in a configuration file.

The name attribute identifies the database whose table is used for the SqlCacheDependency.

Applies to

Tuote Versiot
.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

See also