Create a C# program that makes a copy of a text file but reverse all its content. Create a file with the same name but with extension "inv".
public class ReverseTextFile
public static void Main(string args)
string inputFileName = "input.txt";
string outputFileName = "input.inv";
string lines = File.ReadAllLines(inputFileName);
using (StreamWriter writer = File.CreateText(outputFileName))
for (int i = lines.Length - 1; i >= 0; i--)
Practice C# anywhere with the free app for Android devices.
Learn C# at your own pace, the exercises are ordered by difficulty.
Own and third party cookies to improve our services. If you go on surfing, we will consider you accepting its use.