I am trying to read a shapefile using EasyGIS with C#.
My code seems to work except for the last row were i call the GetRecord method.
The exception i get is:
System.ArgumentException: 'fieldIndex must be <= DBFRecordHeader.NumFields and >=0'
What am i doing wrong?
string path = System.IO.Directory.GetCurrentDirectory();
EGIS.ShapeFileLib.ShapeFile shapeFile = new EGIS.ShapeFileLib.ShapeFile();
shapeFile.LoadFromFile(path + "\\CD_VIC_06_imr.shp");
string[] record = shapeFile.GetRecords(shapeFile.RenderSettings.FieldIndex);
Thank you!