public bool RemoveVertex(IDisplay display, int index) { Vertices(_geometry, index); // "leere" Parts entfernen! if (_geometry is Polyline) { IPolyline pLine = (IPolyline)_geometry; for (int i = 0; i < pLine.PathCount; i++) { if (pLine[i] == null) { continue; } if (pLine[i].PointCount == 0) { pLine.RemovePath(i); i = -1; } } } else if (_geometry is IPolygon) { IPolygon poly = (IPolygon)_geometry; for (int i = 0; i < poly.RingCount; i++) { if (poly[i] == null) { continue; } if (poly[i].PointCount == 0) { poly.RemoveRing(i); i = -1; } } } return(true); }