using System;
using System.IO;
public class FileInverter
{
public static void Main()
{
BinaryReader inFile = new BinaryReader(
File.Open("hola.txt", FileMode.Open));
BinaryWriter outFile = new BinaryWriter(
File.Open("hola.txt.inv", FileMode.Create));
long filesize = inFile.BaseStream.Length;
for (long i = filesize - 1; i >= 0; i--)
{
inFile.BaseStream.Seek(i, SeekOrigin.Begin);
byte b = inFile.ReadByte();
outFile.Write(b);
}
inFile.Close();
outFile.Close();
}
}