| ZennoLab.CommandCenter Assembly > ZennoLab.CommandCenter Namespace > DocumentCollection Class : IndexOf Method |
Type: document
The document to locate in the DocumentCollection.
Type: document
The document to locate in the DocumentCollection.
Type: System.Int32
The zero-based index of the first occurrence of item within the entire DocumentCollection, if found; otherwise, –1.
| Exception | Description |
|---|---|
| ArgumentOutOfRangeException | index is less than 0 or index is greater than Count. |
// get main document Document doc = tab.MainDocument; // get index of main document in document collection of current web page int index = docCol.IndexOf(doc);
// get main document $doc = $tab->MainDocument; // get index of main document in document collection of current web page $index = $docCol->IndexOf($doc);
Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.