摘自"水滴石穿"-->"C#中求两点间距离" 本文对参数类型稍做改动 private double GetDistance(double A_x, double A_y, double B_x, double B_y) { double x = System.Math.Abs(B_x - A_x); double y = System.Math.Abs(B_y - A_y); return Math.Sqrt(x * x + y * y); }