CustomDocumentProperties

CustomDocumentProperties

概述

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

自定义文档属性的集合。

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

属性

名称类型访问描述
Countint读取获取集合中的项目数。

方法

签名描述
Add(name: string, value: string)创建一个新的自定义文档属性。
Add(name: string, value: int)创建一个数据类型为 Number 的新自定义文档属性。
Add(name: string, value: DateTime)创建一个数据类型为 DateTime 的新自定义文档属性。
Add(name: string, value: bool)创建一个 Boolean 数据类型的新自定义文档属性。
Add(name: string, value: double)创建一个 Double 数据类型的新自定义文档属性。
AddLinkToContent(name: string, linkSource: string)创建一个链接到内容的自定义文档属性。
GetEnumerator()返回一个 enumeratoriteratorenumerator 对象,可用于遍历集合中的所有项。
Contains(name: string)如果集合中存在具有指定名称的属性,则返回 true。
IndexOf(name: string)获取属性名称对应的索引。
Remove(name: string)从集合中删除具有指定名称的属性。
RemoveAt(index: int)删除指定索引处的属性。
Clear()从集合中移除所有属性。

另请参阅

 中文