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 属性将自动提供其类型为 Object 且其索引类型为 String 的默认索引属性。

适用于