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 属性会引发异常。如果上次调用 MoveNext 方法返回的是 false,则枚举数已经到达 ContextLinkBaseCollection 的末尾。
Current 属性不移动枚举数的位置。连续调用 Current 属性将返回相同的对象,直到调用 MoveNext 或 Reset 为止。
只要集合保持不变,枚举数也就保持有效。如果对该集合进行了更改(例如添加、修改或删除元素),则枚举数将失效且不可恢复。下次调用 MoveNext 或 Reset 将引发 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 成员