ToolboxCategoryItems.GetEnumerator 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回循环访问 ToolboxCategoryItems 集合的枚举数。
public:
virtual System::Collections::Generic::IEnumerator<System::Activities::Presentation::Toolbox::ToolboxCategory ^> ^ GetEnumerator();
public System.Collections.Generic.IEnumerator<System.Activities.Presentation.Toolbox.ToolboxCategory> GetEnumerator();
abstract member GetEnumerator : unit -> System.Collections.Generic.IEnumerator<System.Activities.Presentation.Toolbox.ToolboxCategory>
override this.GetEnumerator : unit -> System.Collections.Generic.IEnumerator<System.Activities.Presentation.Toolbox.ToolboxCategory>
Public Function GetEnumerator () As IEnumerator(Of ToolboxCategory)
返回
的一个 IEnumerator<T> 。ToolboxCategoryItems
实现
注解
枚举器可用于读取集合中的数据,但不能用于修改基础集合。
最初,枚举器位于集合中的第一个元素之前。 在此位置, Current 未定义。 因此,在读取值MoveNext()之前,必须调用Current枚举器将枚举器提升到集合的第一个元素。 只要集合保持不变,枚举器就保持有效。 如果对集合进行了更改(如添加、修改或删除元素),则枚举器将不再有效,并且其行为未定义。
枚举器不具有对集合的独占访问权限;因此,通过集合进行枚举本质上不是线程安全的过程。