共用方式為


ContextNodeCollection.ContextNodeCollectionEnumerator.Current 屬性

取得 ContextNodeCollection 中的 ContextNode 物件,列舉值會指向前者。

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

語法

'宣告
Public ReadOnly Property Current As ContextNode
'用途
Dim instance As ContextNodeCollection..::.ContextNodeCollectionEnumerator
Dim value As ContextNode

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

屬性值

型別:System.Windows.Ink.ContextNode
ContextNodeCollection 中的 ContextNode 物件,列舉值會指向前者。

備註

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

如果上次呼叫 MoveNext 方法傳回 false,則 Current 屬性會擲回例外狀況。如果最後一次呼叫 MoveNext 方法時傳回 false,表示列舉值已到達 ContextNodeCollection 的結尾。

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

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

平台

Windows Vista

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

版本資訊

.NET Framework

支援版本:3.0

請參閱

參考

ContextNodeCollection.ContextNodeCollectionEnumerator 類別

ContextNodeCollection.ContextNodeCollectionEnumerator 成員

System.Windows.Ink 命名空間