﻿using System;
using System.IO;
//Write a program that concatenates two text files into another text file.
class FileConcat
{
    static void Main()
    {
        Console.Write("Destination:");
        string destination=Console.ReadLine();
        Console.Write("Source one:");
        string sourceOne=Console.ReadLine();
        Console.Write("Source two:");
        string sourceTwo=Console.ReadLine();
        using (StreamWriter result = new StreamWriter(@"E:\Result.txt"))
        {
            using (StreamReader StreamSourceOne = new StreamReader(sourceOne))
            {
                while (!StreamSourceOne.EndOfStream)
                {
                    result.WriteLine(StreamSourceOne.ReadLine());
                }
            }
            using (StreamReader StreamSourceTwo = new StreamReader(sourceTwo))
            {
                while (!StreamSourceTwo.EndOfStream)
                {
                    result.WriteLine(StreamSourceTwo.ReadLine());
                }
            }
        }
    }
}

