Click or drag to resize

Adding an Indexer

Indexers may be added to free standing classes, structs and interfaces. They cannot be added to the main driver hierarchy.

To add an indexer to a driver

  1. From Solution Explorer, double-click the Driver Designer node under the Nimbus node.

  2. The IVI.NET Driver Designer tree view opens.

  3. Expand the root node, which will be named after the driver assembly (e.g.: Acme.Acme4321).

  4. Locate and then select the desired class, struct, or interface where the new indexer is desired.

  5. Right-click on the selected node and choose Add Indexer.

  6. A new indexer is added with the required name and the tree node enters edit mode. By default the indexer type is Double, and it will have a single String parameter (name).

  7. With the indexer node still in edit mode, change the indexer type (after the colon) or parameter list as desired, and hit the Enter key. The colon and indexer type can be excluded if the desired indexer type is Double.

    Note Note

    Indexers must have at least one parameter, and can be overloaded just like methods based on differences in the parameter list.

    Indexers must be named Item, and cannot be renamed. Attempting to do so will result in an error message.

    Refer to the help topic Understanding Type Name Resolution in Nimbus for more information regarding how Nimbus resolves type names entered into the designer.

  8. After the indexer is added, the IVI.NET Indexer General Editor appears in the right portion of the IVI.NET Driver Designer. See the help topic for that Item Editor for details on defining the indexer further.

See Also

Download a complete CHM version of this documentation here.