static void SystemInfo(/*string file*/) { string file = @"../../System Info.txt"; StreamWriter writer = new StreamWriter(new FileStream(file, FileMode.Create)); writer.WriteLine(PCStatus.SystemInfo().GetFields()); writer.Close(); Console.WriteLine($"SystemInfo() done at {Math.Round(sec, 1)} sec"); }
static void SerializedSystemInfo(/*string file*/) { string file = @"../../System Info.txt"; FileStream s1 = new FileStream(file, FileMode.Create); BinaryFormatter formatter = new BinaryFormatter(); using (s1) { formatter.Serialize(s1, PCStatus.SystemInfo()); } Console.WriteLine($"SerializedSystemInfo() done at {Math.Round(sec, 1)} sec"); }