Zennolab.CommandCenter
IndexOf Method
See Also  Example Send Feedback
Zennolab.CommandCenter Namespace > DocumentCollection Class : IndexOf Method
document

Type: document

The document to locate in the DocumentCollection.

Searches for the specified object and returns the zero-based index of the first occurrence within the entire DocumentCollection.

Syntax

C# 
public int IndexOf( 
   Document document
)

Parameters

document

Type: document

The document to locate in the DocumentCollection.

Return Value

Type: System.Int32

The zero-based index of the first occurrence of item within the entire DocumentCollection, if found; otherwise, –1.

Example

The following code example demonstrates uses of the IndexOf method.
C#Copy Code
Document doc = tab.MainDocument;
            
int index = docCol.IndexOf(doc);
PHPCopy Code
$doc = $tab->MainDocument;
            
$index = $docCol->IndexOf($doc);

Remarks

The DocumentCollection is searched forward starting at index and ending at the last element.

Requirements

Target Platforms: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2011 All Rights Reserved.