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.LinkCollectionLinkLabel.LinkCollectionLinkLabel.LinkCollectionLinkLabel.LinkCollection
實作

備註

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 的淺層複本 (Shallow Copy)。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).

Extension Methods

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.

適用於