Jaa


DictIndex.numberOfFields Method

Definition

Returns the number of fields in the index definition.

public:
 virtual int numberOfFields();
public virtual int numberOfFields ();
abstract member numberOfFields : unit -> int
override this.numberOfFields : unit -> int
Public Overridable Function numberOfFields () As Integer

Returns

The number of fields in the index.

Remarks

The following example shows the retrieval of the number of fields in the index and lists the names of the fields in the index.

Dictionary dict; 
DictTable  table; 
DictIndex  idx; 
DictField  field; 
int i; 
dict = new Dictionary(); 
table = new DictTable(dict.tableName2Id("Address")); 
idx = new DictIndex(table.id(), table.indexName2Id("AddrIdx")); 
for (i=1; i <= idx.numberOfFields(); i++) 
{ 
    field = new DictField(table.id(), idx.field(i)); 
    print field.name(); 
}

Applies to