Linq最好去网上百度下 这个学了很有用的
- Point3dCollection pts = new Point3dCollection { new Point3d(), new Point3d(), new Point3d(1, 1, 0) };
- var lst =
- pts.Cast<Point3d>()
- .GroupBy(p => p)
- .Where(g => g.Count() == 1)
- .Select(g => g.Key);
- var doc = Application.DocumentManager.MdiActiveDocument;
- var ed = doc.Editor;
- foreach (var pt in lst)
- ed.WriteMessage("\nPoint:{0}", pt);
|