共用方式為


SqlCacheDependencyDatabase.Name 屬性

定義

取得或設定資料庫名稱。

public:
 property System::String ^ Name { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("name", IsKey=true, IsRequired=true)]
[System.Configuration.StringValidator(MinLength=1)]
public string Name { get; set; }
[<System.Configuration.ConfigurationProperty("name", IsKey=true, IsRequired=true)>]
[<System.Configuration.StringValidator(MinLength=1)>]
member this.Name : string with get, set
Public Property Name As String

屬性值

一個字串,用來指定用來識別資料庫的名稱 SqlCacheDependencyDatabase

屬性

範例

以下程式碼範例說明如何使用該 Name 屬性。


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

// Set the Name for this configuration element.
sqlCdd.Name = "ConfigElementName";
' Get the current Name property value.
Dim nameValue As String = sqlCdd.Name

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

備註

這個Name特性允許你程式化地存取並修改name設定檔中節點元素adddatabases的屬性。

屬性 name 識別用於 的 SqlCacheDependency資料庫資料表。

適用於

另請參閱