using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Diagnostics; using System.IO; namespace MathModTasks { internal class DebugandTrace { public static void CreeateTXT() { Trace.Listeners.Add(new TextWriterTraceListener("Debug.txt")); Debug.Indent(); Trace.Indent(); Debug.WriteLine("Программа запустилась"); Debug.WriteLine("Дата: {0}", DateTime.Today); } public static void OTV(Path savingPath) { try { Debug.WriteLine("Найденный путь имеет вид:"); Debug.WriteLine(savingPath.path); Debug.WriteLine("Его длина составляет: " + savingPath.length); Trace.Flush(); } catch { Console.WriteLine("Не удалось вывести в консоль!"); Console.ReadKey(); Environment.Exit(0); } } } }