This documentation is archived and is not being maintained.

LinkLabel.LinkCollection Class

Represents the collection of links within a LinkLabel control.

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

public class LinkCollection : IList, 
	ICollection, IEnumerable

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 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0