跳轉到主要內容
這是通用方法。任何平台特定的實作限制,都會列在使用此方法之物件主題開頭。
此方法會將現有物件加入集合尾端。

語法

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) 。

另請參見

使用集合