共用方式為


DataSourceElement.Name 屬性

取得或設定app.config檔案中的資料來源名稱設定項目。

命名空間:  Microsoft.VisualStudio.TestTools.UnitTesting
組件:  Microsoft.VisualStudio.QualityTools.UnitTestFramework (在 Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll 中)

語法

'宣告
<ConfigurationPropertyAttribute("name", IsKey := True, IsRequired := True)> _
Public Property Name As String
[ConfigurationPropertyAttribute("name", IsKey = true, IsRequired = true)]
public string Name { get; set; }
[ConfigurationPropertyAttribute(L"name", IsKey = true, IsRequired = true)]
public:
property String^ Name {
    String^ get ();
    void set (String^ value);
}
[<ConfigurationPropertyAttribute("name", IsKey = true, IsRequired = true)>]
member Name : string with get, set
function get Name () : String 
function set Name (value : String)

屬性值

類型:String
資料來源名稱。

.NET Framework 安全性

請參閱

參考

DataSourceElement 類別

Microsoft.VisualStudio.TestTools.UnitTesting 命名空間