LinkLabel.LinkCollection.Item[] Property

Definition

Gets an item from the collection.

Overloads

Item[String]

Gets a link with the specified key from the collection.

Item[Int32]

Gets or sets the link at the specified index within the collection.

Item[String]

Source:
LinkLabel.LinkCollection.cs
Source:
LinkLabel.LinkCollection.cs
Source:
LinkLabel.LinkCollection.cs

Gets a link with the specified key from the collection.

C#
public virtual System.Windows.Forms.LinkLabel.Link this[string key] { get; }
C#
public virtual System.Windows.Forms.LinkLabel.Link? this[string key] { get; }

Parameters

key
String

The name of the link to retrieve from the collection.

Property Value

The LinkLabel.Link with the specified key within the collection.

Remarks

The key comparison is not case-sensitive. If the key parameter is null or an empty string, Item[] returns null.

The Name property corresponds to the key for a LinkLabel.Link in the LinkLabel.LinkCollection.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.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, 10

Item[Int32]

Source:
LinkLabel.LinkCollection.cs
Source:
LinkLabel.LinkCollection.cs
Source:
LinkLabel.LinkCollection.cs

Gets or sets the link at the specified index within the collection.

C#
public virtual System.Windows.Forms.LinkLabel.Link this[int index] { get; set; }

Parameters

index
Int32

The index of the link in the collection to get.

Property Value

An object representing the link located at the specified index within the collection.

Exceptions

The value of index is a negative value or greater than the number of items in the collection.

Remarks

You can use this method to obtain the link stored at a specific location within the collection. To determine the index of a specific item within the collection, use the IndexOf method.

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 1.1, 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, 10