public Sequence Append(byte b)
            {
                var bytes = new byte[Bytes.Length + 1];

                Bytes.CopyTo(bytes, 0);
                bytes[Bytes.Length] = b;
                return(new Sequence(bytes));
            }
Exemplo n.º 2
0
        private void GuardarArchivoOriginal(string nombre)
        {
            if (File.Exists(Path.Combine(Ruta, nombre)))
            {
                throw new InvalidOperationException("El Archivo ya existe");
            }

            FileStream fs = new FileStream(Path.Combine(Ruta, nombre), FileMode.CreateNew);

            Bytes.Position = 0;
            Bytes.CopyTo(fs);
            fs.Position = 0;
            fs.Flush();
            fs.Close();
        }