LinkLabel.LinkCollection Class
TOC
Collapse the table of content
Expand the table of content

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)

System.Object
  System.Windows.Forms.LinkLabel.LinkCollection

public class LinkCollection : IList, ICollection, IEnumerable

NameDescription
System_CAPS_pubmethodLinkLabel.LinkCollection(LinkLabel)

Initializes a new instance of the LinkLabel.LinkCollection class.

NameDescription
System_CAPS_pubpropertyCount

Gets the number of links in the collection.

System_CAPS_pubpropertyIsReadOnly

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

System_CAPS_pubpropertyItem[Int32]

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

System_CAPS_pubpropertyItem[String]

Gets a link with the specified key from the collection.

System_CAPS_pubpropertyLinksAdded

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

NameDescription
System_CAPS_pubmethodAdd(Int32, Int32)

Adds a link to the collection.

System_CAPS_pubmethodAdd(Int32, Int32, Object)

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

System_CAPS_pubmethodAdd(LinkLabel.Link)

Adds a link with the specified value to the collection.

System_CAPS_pubmethodClear()

Clears all links from the collection.

System_CAPS_pubmethodContains(LinkLabel.Link)

Determines whether the specified link is within the collection.

System_CAPS_pubmethodContainsKey(String)

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

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetEnumerator()

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

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodIndexOf(LinkLabel.Link)

Returns the index of the specified link within the collection.

System_CAPS_pubmethodIndexOfKey(String)

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

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodRemove(LinkLabel.Link)

Removes the specified link from the collection.

System_CAPS_pubmethodRemoveAt(Int32)

Removes a link at a specified location within the collection.

System_CAPS_pubmethodRemoveByKey(String)

Removes the link with the specified key.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodICollection.CopyTo(Array, Int32)

For a description of this member, see ICollection.CopyTo.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIList.Add(Object)

For a description of this member, see IList.Add.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIList.Contains(Object)

For a description of this member, see IList.Contains.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIList.IndexOf(Object)

For a description of this member, see IList.IndexOf.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIList.Insert(Int32, Object)

For a description of this member, see IList.Insert.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIList.Remove(Object)

For a description of this member, see IList.Remove.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyICollection.IsSynchronized

For a description of this member, see ICollection.IsSynchronized.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyICollection.SyncRoot

For a description of this member, see ICollection.SyncRoot.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIList.IsFixedSize

For a description of this member, see .IList.IsFixedSize.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIList.Item[Int32]

For a description of this member, see IList.Item.

NameDescription
System_CAPS_pubmethodAsParallel()

Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.)

System_CAPS_pubmethodAsQueryable()

Overloaded. Converts an IEnumerable to an IQueryable.(Defined by Queryable.)

System_CAPS_pubmethodCast<TResult>()

Casts the elements of an IEnumerable to the specified type.(Defined by Enumerable.)

System_CAPS_pubmethodOfType<TResult>()

Filters the elements of an IEnumerable based on a specified type.(Defined by Enumerable.)

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.

.NET Framework
Available since 1.1

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

Return to top
Show:
© 2016 Microsoft