ModelMemberCollection<TItemType, TKeyType>.Item 屬性 (String)
在集合中搜尋具有指定索引鍵的項目,如果找到就傳回該項目。
命名空間: Microsoft.Windows.Design.Model
組件: Microsoft.Windows.Design.Interaction (在 Microsoft.Windows.Design.Interaction.dll 中)
語法
'宣告
Public ReadOnly Default Property Item ( _
name As String _
) As TItemType
Get
public TItemType this[
string name
] { get; }
public:
property TItemType default[String^ name] {
TItemType get (String^ name);
}
member Item : 'TItemType
JScript 不支援索引屬性。
參數
- name
型別:System.String
要尋找之項目的索引鍵。
屬性值
型別:TItemType
具有指定索引鍵的 TItemType。如果找不到,這個屬性會擲回例外狀況。
例外狀況
例外狀況 | 條件 |
---|---|
ArgumentNullException | name 為 nullNull 參照 (即 Visual Basic 中的 Nothing)。 |
ArgumentException | 找不到 name。 |
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。
請參閱
參考
ModelMemberCollection<TItemType, TKeyType> 類別
Microsoft.Windows.Design.Model 命名空間