LinkLabel.LinkCollection Class

Represents the collection of links within a LinkLabel control.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in

Public Class LinkCollection
	Implements IList, ICollection, IEnumerable
Dim instance As LinkCollection

public class LinkCollection implements IList, ICollection, 
public class LinkCollection implements IList, ICollection, 
Not applicable.

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.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0