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

要在集合中搜尋的樣式名稱。

屬性值

Object

object,其中包含符合 styleName 參數中特定名稱的指定樣式值。

備註

在 Microsoft JScript 中,您可以使用類型所定義的預設索引屬性,但無法明確定義自己的屬性。 但是,在類別上指定 expando 屬性 (Attribute) 會自動提供預設索引屬性 (Property),該屬性 (Property) 的類型為 Object 而且索引類型為 String

適用於