LoadTestContext.Item 屬性
取得或設定具有指定之索引鍵的 LoadTestContext 項目。
命名空間: Microsoft.VisualStudio.TestTools.LoadTesting
組件: Microsoft.VisualStudio.QualityTools.LoadTestFramework (在 Microsoft.VisualStudio.QualityTools.LoadTestFramework.dll 中)
語法
'宣告
Public Default Property Item ( _
key As String _
) As Object
public Object this[
string key
] { get; set; }
public:
virtual property Object^ default[String^ key] {
Object^ get (String^ key) sealed;
void set (String^ key, Object^ value) sealed;
}
abstract Item :
key:string -> Object with get, set
override Item :
key:string -> Object with get, set
JScript 不支援索引屬性。
參數
key
類型:String要取得或設定之項目的索引鍵。
屬性值
類型:Object
具有指定索引鍵的項目。
實作
IDictionary.Item
例外狀況
例外狀況 | 條件 |
---|---|
ArgumentNullException | key 為 nullnull 參考 (即 Visual Basic 中的 Nothing)。 |
KeyNotFoundException | 屬性已擷取,並且找不到 key。 |
NotSupportedException | 屬性已設定,而且 LoadTestContext 是唯讀的。 |
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。