Aries.CodeDOMCompiler.pumpFile C# (CSharp) Метод

pumpFile() публичный статический Метод

Append bytes to the end of the file
public static pumpFile ( string FileName, long Bytes ) : void
FileName string File to append bytes to
Bytes long number of bytes to append
Результат void
        public static void pumpFile(string FileName, long Bytes)
        {
            System.IO.FileStream pumpFile = System.IO.File.OpenWrite(FileName);
            long pumpSize = pumpFile.Seek(0, System.IO.SeekOrigin.End);
            byte[] bytarray = new byte[Bytes + 10];

            bytarray = Encoding.UTF8.GetBytes(Util.getRandNum(bytarray.Length));
            //new Random().NextBytes() <- flagged on Avira as TR/Generic

            while (pumpSize < Bytes)
            {
                pumpSize++;
                pumpFile.WriteByte(bytarray[pumpSize]);
            }
            pumpFile.Close();
        }