public static Point GeneratePoint(double x, double y) { int index = database.IndexOf(new Point("", x, y)); if (index != -1) { return(database[index]); } Point newPt = new Point(GetCurrentName(), x, y); Point oldPt = Utilities.GetStructurally <Point>(database, newPt); if (oldPt != null) { return(oldPt); } database.Add(newPt); return(newPt); }