I have table which I need to get all the OID's from it.
I tried this code :
List<int> OIDList = new List<int>();
IQueryFilter queryFilter = new QueryFilterClass();
queryFilter.SubFields = "OBJECTID";
for (int i = 1; i <= table.RowCount(queryFilter); i++) {
OIDList.Add(i);
}
But the problem is there is some values were skipped, e.g. the table contains 60 row but the OID
for the last row is 100.
In the code above, I can not catch any OID
more than 60.
How can I get all the OIDs?
Best Answer
I would use the
ITable
interface if it is a standalone table.