X509Certificate2Enumerator 類別

定義

支援簡單反覆處理 X509Certificate2CollectionSupports a simple iteration over a X509Certificate2Collection object. 此類別無法獲得繼承。This class cannot be inherited.

public ref class X509Certificate2Enumerator sealed : System::Collections::IEnumerator
public sealed class X509Certificate2Enumerator : System.Collections.IEnumerator
type X509Certificate2Enumerator = class
    interface IEnumerator
Public NotInheritable Class X509Certificate2Enumerator
Implements IEnumerator
繼承
X509Certificate2Enumerator
實作

備註

枚舉器提供集合中資料的唯讀存取。Enumerators provide read-only access to the data in the collection. 枚舉器不能用來修改基礎集合。Enumerators cannot be used to modify the underlying collection.

一開始,列舉程式位在集合中的第一個項目之前。Initially, the enumerator is positioned before the first element in the collection. 方法也會將列舉值帶 Reset 回至這個位置。The Reset method also brings the enumerator back to this position. 在這個位置,呼叫屬性會擲回 Current 例外狀況。At this position, calling the Current property throws an exception. 因此,您必須呼叫 MoveNext 方法,將列舉值前進到集合中的第一個元素,然後再讀取的值 CurrentTherefore, you must call the MoveNext method to advance the enumerator to the first element of the collection before reading the value of Current.

這個類別繼承自 IEnumerator 介面。This class inherits from the IEnumerator interface. 如需列舉集合的詳細資訊,請參閱 IEnumeratorFor more information about enumerating over a collection, see IEnumerator.

屬性

Current

取得 X509Certificate2Collection 物件中目前的項目。Gets the current element in the X509Certificate2Collection object.

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
MoveNext()

將列舉值前移至 X509Certificate2Collection 物件中的下一個項目。Advances the enumerator to the next element in the X509Certificate2Collection object.

Reset()

將列舉值設定至其初始位置,也就是 X509Certificate2Collection 物件中的第一個項目之前。Sets the enumerator to its initial position, which is before the first element in the X509Certificate2Collection object.

ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

明確介面實作

IEnumerator.Current

如需這個成員的說明,請參閱 CurrentFor a description of this member, see Current.

IEnumerator.MoveNext()

如需這個成員的說明,請參閱 MoveNext()For a description of this member, see MoveNext().

IEnumerator.Reset()

如需這個成員的說明,請參閱 Reset()For a description of this member, see Reset().

適用於