DictIndex.field(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the ID of the specified field in the index.
public:
virtual int field(int _fieldNumber);
public virtual int field (int _fieldNumber);
abstract member field : int -> int
override this.field : int -> int
Public Overridable Function field (_fieldNumber As Integer) As Integer
Parameters
- _fieldNumber
- Int32
The one-based index of the field in the index.
Returns
The ID of the field that is specified by fieldNumber; 0 (zero) if fieldNumber does not represent a valid field.
Remarks
The following example shows the retrieval of each field in an index. The name of each field is displayed by using a loop.
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();
}