Beispiel #1
0
        static void VideoConrollersInfo(/*string file*/)
        {
            string       file   = @"../../Video Controllers Info.txt";
            StreamWriter writer = new StreamWriter(new FileStream(file, FileMode.Create));

            foreach (var elem in PCStatus.VideoControllersInfo())
            {
                writer.WriteLine(elem.GetFields());
                writer.WriteLine("---------------");
            }
            writer.Close();
            Console.WriteLine($"VideoConrollersInfo() done at {Math.Round(sec, 1)} sec");
        }
Beispiel #2
0
        static void SerializedVideoConrollersInfo(/*string file*/)
        {
            string          file      = @"../../Video Controllers Info.txt";
            FileStream      s1        = new FileStream(file, FileMode.Create);
            BinaryFormatter formatter = new BinaryFormatter();

            List <VideoControllerInfo> list = PCStatus.VideoControllersInfo();

            using (s1)
            {
                formatter.Serialize(s1, list);
            }

            Console.WriteLine($"SerializedVideoConrollersInfo() done at {Math.Round(sec, 1)} sec");
        }