Version Info

Help About Web Editors Home
Online VI Editor
Online Emacs Editor
Command Line Arguments: STDIN Input:
Multiple Files
using System.IO;
using System;

class Program
{
    static void Main()
    {
        // Read in every line in the file.
        using (StreamReader reader = new StreamReader("input.txt"))
        {
            string line;
            while ((line = reader.ReadLine()) != null)
            {
                Console.WriteLine(line);
            }
        }
    }
}

 
This is the file you can use to provide input to your program and later on open it inside your program to process the input.