Style.Item[String] 屬性

定義

取得與參數中名稱 styleName 相符的指定樣式值。 在 C# 中,這個屬性就是類別的 Style 索引器。

public:
 virtual property System::Object ^ default[System::String ^] { System::Object ^ get(System::String ^ styleName); };
public override object this[string styleName] { get; }
member this.Item(string) : obj
Default Public Overrides ReadOnly Property Item(styleName As String) As Object

參數

styleName
String

在收藏中要搜尋的風格名稱。

屬性值

An object 包含與參數中名稱 styleName 相符的樣式值。

備註

在 Microsoft JScript 中,你可以使用由某個類型定義的預設索引屬性,但你無法明確定義自己的屬性。 然而,在 expando 類別上指定屬性會自動提供一個預設的索引屬性,其型別為 Object ,索引型別為 String

適用於