CommentCollection
CommentCollection
概述
CommentCollection 是 Aspose.Words FOSS 中用于 .NET 的类。继承自:NodeCollection。
提供对 Comment 节点集合的类型化访问。
此类提供 9 个方法,用于在 .NET 程序中处理 CommentCollection 对象。可用的方法包括:Add, Clear, Contains, GetEnumerator, IndexOf, Insert, Remove, RemoveAt, ToArray。在安装了 Aspose.Words FOSS for .NET 包后,所有公共成员对任何 .NET 应用程序均可访问。属性:Count。
属性
| 名称 | 类型 | 访问 | 描述 |
|---|---|---|---|
Count | int | 读取 | 获取集合中节点的数量。 |
方法
| 签名 | 描述 |
|---|---|
Add(node: Node) | 将节点添加到集合的末尾。 |
Insert(index: int, node: Node) | 在集合的指定索引位置插入节点。 |
Remove(node: Node) | 将节点从集合和文档中删除。 |
RemoveAt(index: int) | 从集合中以及文档中移除指定索引处的节点。 |
Clear() | 从此集合以及文档中移除所有节点。 |
Contains(node: Node) | 确定节点是否在集合中。 |
IndexOf(node: Node) | 返回指定节点的零基索引。 |
ToArray() | 将集合中的所有节点复制到一个新的节点数组中。 |
GetEnumerator() | 提供一种简单的 “foreach” 风格的遍历,适用于节点集合。 |