FormCollection.Item[] Property

Definition

Provides access to the Form objects within the collection.

Overloads

Item[Int32]

Gets or sets an element in the collection by its numeric index.

Item[String]

Gets or sets an element in the collection by the name of the associated Form object.

Item[Int32]

Gets or sets an element in the collection by its numeric index.

public virtual System.Windows.Forms.Form this[int index] { get; }
public virtual System.Windows.Forms.Form? this[int index] { get; }

Parameters

index
Int32

The location of the Form within the collection.

Property Value

The form at the specified index.

Applies to

.NET Framework 4.8.1 וגירסאות אחרות
מוצר גירסאות
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

Item[String]

Gets or sets an element in the collection by the name of the associated Form object.

public virtual System.Windows.Forms.Form this[string name] { get; }
public virtual System.Windows.Forms.Form? this[string? name] { get; }

Parameters

name
String

The name of the Form.

Property Value

The form with the specified name.

Applies to

.NET Framework 4.8.1 וגירסאות אחרות
מוצר גירסאות
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9