跳轉到主要內容
這是常見方法。若使用此方法的物件有任何特定平台的實作限制,都會列在相關主題的開頭。
此方法會將現有物件新增到集合的末端。

語法

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

另請參閱

使用集合