แก้ไข

แชร์ผ่าน


HtmlWindowCollection.Item[] Property

Definition

Retrieves an item either by its name property or its position in the collection.

Overloads

Item[Int32]

Retrieves a frame window by supplying the frame's position in the collection.

Item[String]

Retrieves a frame window by supplying the frame's name.

Remarks

Item[] enables access to the elements of the collection using array syntax.

Item[Int32]

Source:
HtmlWindowCollection.cs
Source:
HtmlWindowCollection.cs
Source:
HtmlWindowCollection.cs

Retrieves a frame window by supplying the frame's position in the collection.

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

Parameters

index
Int32

The position of the HtmlWindow within the collection.

Property Value

The HtmlWindow corresponding to the requested frame.

Exceptions

index is greater than the number of items in the collection.

Remarks

HtmlWindowCollection is a zero-based collection. If there are N elements in the collection, valid arguments to Item[] are the integers from 0 to N-1.

Windows are not laid out in HtmlWindowCollection in any predetermined order.

See also

Applies to

Item[String]

Source:
HtmlWindowCollection.cs
Source:
HtmlWindowCollection.cs
Source:
HtmlWindowCollection.cs

Retrieves a frame window by supplying the frame's name.

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

Parameters

windowId
String

The name of the HtmlWindow to retrieve.

Property Value

The HtmlWindow element corresponding to the supplied name.

Exceptions

windowId is not the name of a Frame object in the current document or in any of its children.

Remarks

Item[] will return a single element whose Name property corresponds to elementId. If the document contains multiple elements with the same name, Item[] will return only the first one in the collection. If you need to retrieve all elements with a Name property of windowId, use the GetElementsByName method instead.

See also

Applies to