コード例 #1
0
        static void Main(string[] args)
        {
            FileWriterWithProgress fileWriterWithProgress = new FileWriterWithProgress();

            fileWriterWithProgress.DataWriting     += FileWriterWithProgress_DataWriting;
            fileWriterWithProgress.DataWritingDone += FileWriterWithProgress_DataWritingDone;
            fileWriterWithProgress.WriteBytes(@"F:\testF.txt", GetDataByte(), 0.15f);
            Console.ReadLine();
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: Kirik00714/nordic-it-cs-q1
        static void Main(string[] args)
        {
            var filewriterwithprogress = new FileWriterWithProgress();

            filewriterwithprogress.WritingPerformed += Filewriterwithprogress_WritingPerformed;
            filewriterwithprogress.WritingCompleted += Filewriterwithprogress_WritingCompleted;
            var data = new byte[10];

            new Random().NextBytes(data);
            filewriterwithprogress.WriteBytes("File.txt", data, 0.1f);
            Console.ReadKey();
        }