public ShapeReader(string FileName) : base() { _fileName = FileName; if (!File.Exists(FileName)) { throw new FileNotFoundException("Could not find the file: " + Path.GetFullPath(FileName)); } _data = new DBFReader(FileName); // Open shapefile _shapePointer = ShapeLib.SHPOpen(FileName, "rb"); int nbentities = 0; double[] arr1 = new double[4]; double[] arr2 = new double[4]; ShapeLib.SHPGetInfo(_shapePointer, ref nbentities, ref type, arr1, arr2); NoOfEntries = nbentities; }