public object[] Readfile(string path) { shapefile.ShapeFileToString(path); Filelength = shapefile.FileLength; Version = shapefile.Version; Shapetype = shapefile.ShapeType; BoundBox = shapefile.Box; switch (Shapetype) { case 3: object polylines = shapefile.CollectionGemotry(path); CollPolyline = (Polyline[])polylines; return(CollPolyline); case 5: object polygons = shapefile.CollectionGemotry(path); CollPolygon = (Polygon[])polygons; return(CollPolygon); default: return(null); } }