public static Path_ ReadFromFile(string fileName) { using (StreamReader reader = new StreamReader(fileName)) { Path_ path = new Path_(); string line; while ((line = reader.ReadLine()) != null) { string[] nums = line.Split(' '); path.AddPointToPath(new Point3D(double.Parse(nums[0]), double.Parse(nums[1]), double.Parse(nums[2]))); } return path; } }