LinkLabel.LinkCollection LinkLabel.LinkCollection LinkLabel.LinkCollection LinkLabel.LinkCollection Class

Definition

Represents the collection of links within a LinkLabel control.

public: ref class LinkLabel::LinkCollection : System::Collections::IList
public class LinkLabel.LinkCollection : System.Collections.IList
type LinkLabel.LinkCollection = class
    interface IList
    interface ICollection
    interface IEnumerable
Public Class LinkLabel.LinkCollection
Implements IList
Inheritance
LinkLabel.LinkCollectionLinkLabel.LinkCollectionLinkLabel.LinkCollectionLinkLabel.LinkCollection
Implements

Remarks

The LinkLabel.LinkCollection class stores the link displayed in the LinkLabel control. Each item in the collection is an instance of the LinkLabel.Link class, which defines the information of the link.

The Add method provides the ability to add a single LinkLabel.Link to the collection. To remove links, you can use either the Remove method or the RemoveAt method if you know where the link is located within the collection. The Clear method enables you to remove all links from the collection instead of using the Remove method to remove a single link at a time.

In addition to methods and properties for adding and removing items, the LinkLabel.LinkCollection also provides methods to find links within the collection. The Contains method enables you to determine whether a LinkLabel.Link is a member of the collection. Once you know that the link is located within the collection, you can use the IndexOf method to determine where the link is located within the collection.

Constructors

LinkLabel.LinkCollection(LinkLabel) LinkLabel.LinkCollection(LinkLabel) LinkLabel.LinkCollection(LinkLabel) LinkLabel.LinkCollection(LinkLabel)

Initializes a new instance of the LinkLabel.LinkCollection class.

Properties

Count Count Count Count

Gets the number of links in the collection.

IsReadOnly IsReadOnly IsReadOnly IsReadOnly

Gets a value indicating whether this collection is read-only.

Item[Int32] Item[Int32] Item[Int32] Item[Int32]

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

Item[String] Item[String] Item[String] Item[String]

Gets a link with the specified key from the collection.

LinksAdded LinksAdded LinksAdded LinksAdded

Gets a value indicating whether links have been added to the LinkLabel.LinkCollection.

Methods

Add(Int32, Int32) Add(Int32, Int32) Add(Int32, Int32) Add(Int32, Int32)

Adds a link to the collection.

Add(Int32, Int32, Object) Add(Int32, Int32, Object) Add(Int32, Int32, Object) Add(Int32, Int32, Object)

Adds a link to the collection with information to associate with the link.

Add(LinkLabel+Link) Add(LinkLabel+Link) Add(LinkLabel+Link) Add(LinkLabel+Link)

Adds a link with the specified value to the collection.

Clear() Clear() Clear() Clear()

Clears all links from the collection.

Contains(LinkLabel+Link) Contains(LinkLabel+Link) Contains(LinkLabel+Link) Contains(LinkLabel+Link)

Determines whether the specified link is within the collection.

ContainsKey(String) ContainsKey(String) ContainsKey(String) ContainsKey(String)

Returns a value indicating whether the collection contains a link with the specified key.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

Returns an enumerator to use to iterate through the link collection.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
IndexOf(LinkLabel+Link) IndexOf(LinkLabel+Link) IndexOf(LinkLabel+Link) IndexOf(LinkLabel+Link)

Returns the index of the specified link within the collection.

IndexOfKey(String) IndexOfKey(String) IndexOfKey(String) IndexOfKey(String)

Retrieves the zero-based index of the first occurrence of the specified key within the entire collection.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
Remove(LinkLabel+Link) Remove(LinkLabel+Link) Remove(LinkLabel+Link) Remove(LinkLabel+Link)

Removes the specified link from the collection.

RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32)

Removes a link at a specified location within the collection.

RemoveByKey(String) RemoveByKey(String) RemoveByKey(String) RemoveByKey(String)

Removes the link with the specified key.

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32)

For a description of this member, see CopyTo(Array, Int32).

ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized

For a description of this member, see IsSynchronized.

ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot

For a description of this member, see SyncRoot.

IList.Add(Object) IList.Add(Object) IList.Add(Object) IList.Add(Object)

For a description of this member, see Add(Object).

IList.Contains(Object) IList.Contains(Object) IList.Contains(Object) IList.Contains(Object)

For a description of this member, see Contains(Object).

IList.IndexOf(Object) IList.IndexOf(Object) IList.IndexOf(Object) IList.IndexOf(Object)

For a description of this member, see IndexOf(Object).

IList.Insert(Int32, Object) IList.Insert(Int32, Object) IList.Insert(Int32, Object) IList.Insert(Int32, Object)

For a description of this member, see Insert(Int32, Object).

IList.IsFixedSize IList.IsFixedSize IList.IsFixedSize IList.IsFixedSize

For a description of this member, see IsFixedSize.

IList.Item[Int32] IList.Item[Int32] IList.Item[Int32] IList.Item[Int32]

For a description of this member, see Item[Int32].

IList.Remove(Object) IList.Remove(Object) IList.Remove(Object) IList.Remove(Object)

For a description of this member, see Remove(Object).

Extension Methods

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

Converts an IEnumerable to an IQueryable.

Applies to