SectionCollection

SectionCollection

概述

SectionCollection 是 Aspose.Words FOSS 中用于 .NET 的类。继承自:NodeCollection。

文档中 Section 对象的集合。

此类提供 9 个方法,用于在 .NET 程序中处理 SectionCollection 对象。可用的方法包括:Add, Clear, Contains, GetEnumerator, IndexOf, Insert, Remove, RemoveAt, ToArray。在安装 Aspose.Words FOSS for .NET 包后,所有公共成员对任何 .NET 应用程序均可访问。属性:Count。

属性

名称类型访问描述
Countint读取获取集合中节点的数量。

方法

签名描述
ToArray()将集合中的所有 sections 复制到一个新的 sections 数组中。
Add(node: Node)在集合的末尾添加一个 node。
Insert(index: int, node: Node)在指定索引处向集合中插入一个 node。
Remove(node: Node)将节点从集合和文档中移除。
RemoveAt(index: int)将指定索引处的节点从集合和文档中移除。
Clear()将所有节点从此集合和文档中移除。
Contains(node: Node)判断节点是否在集合中。
IndexOf(node: Node)返回指定节点的零基索引。
GetEnumerator()提供对节点集合的简单 “foreach” 风格迭代。

另请参阅

 中文