static void Main(string[] args) { Path3D path = new Path3D("../../Path.txt"); Console.WriteLine(path.ToString()); path.addPoint(new Point3D(50, 10, 12)); path.addPoint(new Point3D(7, 9, 12.5)); Console.WriteLine(path.ToString()); path.saveChanges("../../Path.txt"); }
public static void WritePath(Path3D path) { using (StreamWriter writer = new StreamWriter(@"../../paths/pathsoutput.txt")) { string pathString = path.ToString(); pathString = pathString.Replace("\n", Environment.NewLine); writer.WriteLine(pathString); } }
public static void SavePath(string fileName, Path3D path) { try { using (StreamWriter sw = new StreamWriter(fileName, true, Encoding.GetEncoding("UTF-8"))) { sw.WriteLine(path.ToString()); } } catch (Exception ex) { Console.WriteLine(ex.Message); throw ex.InnerException; } }
public static void SavePath(string fileName, Path3D path) { try { using (StreamWriter sw = new StreamWriter(fileName, true, Encoding.GetEncoding("UTF-8"))) { sw.WriteLine(path.ToString()); } } catch (Exception ex) { Console.WriteLine(ex.Message); throw ex.InnerException; } }
public static void SavePath(string destination, Path3D path) { File.AppendAllText(destination, path.ToString()); }
public static void SavePathToFile(string fileLocation, Path3D path) { File.WriteAllText(fileLocation, path.ToString()); }
public static void SavePaths(Path3D points, string filePath) { File.WriteAllText(filePath, points.ToString()); }
//method that save path to file public static void SavePath(string filePath, Path3D path) { File.WriteAllText(filePath, path.ToString()); }
public static void SavePathToFile(string fileLocation, Path3D path) { File.WriteAllText(fileLocation, path.ToString()); }