共用方式為


ContextLinkBaseCollection.ContextLinkBaseCollectionEnumerator.Current 屬性

取得列舉值指向之 ContextLinkBaseCollection 中的 ContextLinkBase 物件。

命名空間:  System.Windows.Ink.AnalysisCore
組件:  IACore (在 IACore.dll 中)

語法

'宣告
Public ReadOnly Property Current As ContextLinkBase
'用途
Dim instance As ContextLinkBaseCollection..::.ContextLinkBaseCollectionEnumerator
Dim value As ContextLinkBase

value = instance.Current
public ContextLinkBase Current { get; }
public:
property ContextLinkBase^ Current {
    ContextLinkBase^ get ();
}
/** @property */
public ContextLinkBase get_Current()
public function get Current () : ContextLinkBase

屬性值

型別:System.Windows.Ink.AnalysisCore.ContextLinkBase
列舉值指向之 ContextLinkBaseCollection 中的 ContextLinkBase 物件。

備註

在建立 ContextLinkBaseCollection.ContextLinkBaseCollectionEnumerator 列舉值或呼叫 Reset 方法之後,必須呼叫 MoveNext 方法使列舉值向前移至集合的第一個項目,才能讀取 Current 屬性的值。否則,Current 屬性為未定義。

如果上次呼叫 MoveNext 方法傳回 false,則 Current 屬性會擲回例外狀況 (Exception)。如果上次呼叫 MoveNext 方法傳回 false,表示列舉值已經到達 ContextLinkBaseCollection 結尾。

Current 屬性不會移動列舉值的位置。在呼叫 MoveNextReset 之前,對 Current 屬性的連續呼叫都會傳回相同的物件。

只要集合保持不變,列舉值將保持有效。如果對集合進行變更,例如加入、修改或刪除項目,則列舉值將失效且無法復原。下次呼叫 MoveNextReset 時會擲回 InvalidOperationException。如果在呼叫 MoveNext 和呼叫 Current 之間修改了集合,則 Current 屬性會傳回其所設定成的項目,即使列舉值已經失效也一樣。

平台

Windows Vista, Windows XP SP2, Windows Server 2003

.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求

版本資訊

.NET Framework

支援版本:3.0

請參閱

參考

ContextLinkBaseCollection.ContextLinkBaseCollectionEnumerator 類別

ContextLinkBaseCollection.ContextLinkBaseCollectionEnumerator 成員

System.Windows.Ink.AnalysisCore 命名空間