Edytuj

Udostępnij za pośrednictwem


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]

Gets a link with the specified key from the collection.

public:
 virtual property System::Windows::Forms::LinkLabel::Link ^ default[System::String ^] { System::Windows::Forms::LinkLabel::Link ^ get(System::String ^ key); };
public virtual System.Windows.Forms.LinkLabel.Link this[string key] { get; }
public virtual System.Windows.Forms.LinkLabel.Link? this[string key] { get; }
member this.Item(string) : System.Windows.Forms.LinkLabel.Link
Default Public Overridable ReadOnly Property Item(key As String) As LinkLabel.Link

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

Item[Int32]

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

public:
 virtual property System::Windows::Forms::LinkLabel::Link ^ default[int] { System::Windows::Forms::LinkLabel::Link ^ get(int index); void set(int index, System::Windows::Forms::LinkLabel::Link ^ value); };
public virtual System.Windows.Forms.LinkLabel.Link this[int index] { get; set; }
member this.Item(int) : System.Windows.Forms.LinkLabel.Link with get, set
Default Public Overridable Property Item(index As Integer) As LinkLabel.Link

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