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


表示 LinkLabel 控件内链接的集合。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


LinkLabel.LinkCollection类存储中显示的链接LinkLabel控件。The LinkLabel.LinkCollection class stores the link displayed in the LinkLabel control. 集合中的每个项是的一个实例LinkLabel.Link类,该类定义的链接的信息。Each item in the collection is an instance of the LinkLabel.Link class, which defines the information of the link.

Add方法提供的功能将添加单个LinkLabel.Link到集合。The Add method provides the ability to add a single LinkLabel.Link to the collection. 若要删除的链接,可以使用任一Remove方法或RemoveAt如果知道该链接位于集合内的方法。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. Clear方法使您能够从而不是使用集合中移除所有链接Remove方法一次都删除的单个链接。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.

用于添加和移除项,方法和属性除了LinkLabel.LinkCollection还提供了方法来查找集合中的链接。In addition to methods and properties for adding and removing items, the LinkLabel.LinkCollection also provides methods to find links within the collection. Contains方法使您能够确定是否LinkLabel.Link是集合的成员。The Contains method enables you to determine whether a LinkLabel.Link is a member of the collection. 一旦您知道该链接位于集合内,就可以使用IndexOf方法可确定该链接是否位于集合内。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.


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

初始化 LinkLabel.LinkCollection 类的新实例。Initializes a new instance of the LinkLabel.LinkCollection class.


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

获取一个值,该值指示链接是否已添加到 LinkLabel.LinkCollection 中。Gets a value indicating whether links have been added to the LinkLabel.LinkCollection.


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()

获取当前实例的 TypeGets 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()

创建当前 Object 的浅表副本。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)


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

有关此成员的说明,请参见 CopyTo(Array, Int32)For a description of this member, see CopyTo(Array, Int32).

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

有关此成员的说明,请参见 IsSynchronizedFor a description of this member, see IsSynchronized.

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

有关此成员的说明,请参见 SyncRootFor a description of this member, see SyncRoot.

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

有关此成员的说明,请参见 Add(Object)For a description of this member, see Add(Object).

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

有关此成员的说明,请参见 Contains(Object)For a description of this member, see Contains(Object).

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

有关此成员的说明,请参见 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)

有关此成员的说明,请参见 Insert(Int32, Object)For a description of this member, see Insert(Int32, Object).

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

有关此成员的说明,请参见 IsFixedSizeFor a description of this member, see IsFixedSize.

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

有关此成员的说明,请参见 Item[Int32]For a description of this member, see Item[Int32].

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

有关此成员的说明,请参见 Remove(Object)For a description of this member, see Remove(Object).


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

IEnumerable 的元素强制转换为指定的类型。Casts the elements of an IEnumerable to the specified type.

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

根据指定类型筛选 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)

将转换IEnumerableIQueryableConverts an IEnumerable to an IQueryable.