跳转到主要内容
这是一个常用方法。任何特定于平台的实现限制都会在使用此方法的对象主题开头列出。
此方法用于将现有对象添加到集合末尾。

语法

C++

HRESULT Add( I<ElementType>* Value );

C#

void Add( I<ElementType> Value );

Visual Basic .NET

Sub Add(Value As I<ElementType>)

参数

Value [in] 表示新添加的元素。ElementType 为构成该集合的对象类型。

返回值

此方法无特定返回值。它会返回 ABBYY FineReader Engine 函数的标准返回值

备注

下表说明了提供此方法的集合,以及这些集合中的元素类型:
集合类型元素类型
ClassificationObjectsClassificationObject
IntsCollectionint
OfficeConverters <Note> 注意:该集合在 Windows 和 Linux 上可用。 </Note>OfficeConverterTypeEnum
RegionsCollectionRegion
SpellReplacementCollection <Note> 注意:该集合仅适用于 Windows。 </Note>SpellReplacement
StringsCollectionBSTR
TrainingImagesCollectionTrainingImage

示例

 
for( int i = 0; i < Document.Pages.Count; i++ )
{
 if( Document.Pages[i].PageStructureOutOfDate )
 {
  pageIndices.Add( i );
 }
}
以下代码示例中使用了该方法:VisualComponents (Win) 。

另请参阅

集合的使用