HtmlWindowCollection.Item[] 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
按项 name 的属性或集合中的位置检索项。
重载
| 名称 | 说明 |
|---|---|
| Item[Int32] |
通过提供框架在集合中的位置来检索框架窗口。 |
| Item[String] |
通过提供框架的名称来检索框架窗口。 |
注解
Item[] 允许使用数组语法访问集合的元素。
Item[Int32]
- Source:
- HtmlWindowCollection.cs
- Source:
- HtmlWindowCollection.cs
- Source:
- HtmlWindowCollection.cs
- Source:
- HtmlWindowCollection.cs
- Source:
- HtmlWindowCollection.cs
通过提供框架在集合中的位置来检索框架窗口。
public:
property System::Windows::Forms::HtmlWindow ^ default[int] { System::Windows::Forms::HtmlWindow ^ get(int index); };
public System.Windows.Forms.HtmlWindow this[int index] { get; }
public System.Windows.Forms.HtmlWindow? this[int index] { get; }
member this.Item(int) : System.Windows.Forms.HtmlWindow
Default Public ReadOnly Property Item(index As Integer) As HtmlWindow
参数
- index
- Int32
集合中的位置 HtmlWindow 。
属性值
对应于 HtmlWindow 所请求的帧。
例外
index 大于集合中的项数。
注解
HtmlWindowCollection 是一个从零开始的集合。 如果集合中有 N 个元素,则有效自变量 Item[] 是 0 到 N-1 的整数。
Windows 未按 HtmlWindowCollection 任何预先确定的顺序进行布局。
另请参阅
适用于
Item[String]
- Source:
- HtmlWindowCollection.cs
- Source:
- HtmlWindowCollection.cs
- Source:
- HtmlWindowCollection.cs
- Source:
- HtmlWindowCollection.cs
- Source:
- HtmlWindowCollection.cs
通过提供框架的名称来检索框架窗口。
public:
property System::Windows::Forms::HtmlWindow ^ default[System::String ^] { System::Windows::Forms::HtmlWindow ^ get(System::String ^ windowId); };
public System.Windows.Forms.HtmlWindow this[string windowId] { get; }
public System.Windows.Forms.HtmlWindow? this[string windowId] { get; }
member this.Item(string) : System.Windows.Forms.HtmlWindow
Default Public ReadOnly Property Item(windowId As String) As HtmlWindow
参数
- windowId
- String
要检索的名称 HtmlWindow 。
属性值
HtmlWindow与提供的名称对应的元素。
例外
windowId 不是当前文档或其任何子文档中的对象的名称 Frame 。
注解
Item[] 将返回其 Name 属性对应于 elementId的单个元素。 如果文档包含多个具有相同名称的元素, Item[] 则仅返回集合中的第一个元素。 如果需要检索具有 Name 其 windowId属性的所有元素,请改用该方法 GetElementsByName 。