TextElementEnumerator.Reset 方法

定义

将枚举数设置为其初始位置,该位置位于字符串中第一个文本元素之前。

public:
 virtual void Reset();
public void Reset ();
abstract member Reset : unit -> unit
override this.Reset : unit -> unit
Public Sub Reset ()

实现

注解

方法 Reset 将枚举数移到字符串开头的第一个文本元素之前。 调用 Reset后,必须调用 MoveNext 以将枚举器前进到字符串的第一个文本元素,然后调用 Current 以读取第一个文本元素的值。

适用于

另请参阅