Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.IO;
- namespace ConsoleApplication2
- {
- class Program
- {
- static void Main(string[] args)
- {
- using(StreamWriter tmp_file = new StreamWriter("e:/practice/tmp.txt", false))
- {
- using(StreamReader first_file = new StreamReader("e:/practice/first.txt", Encoding.GetEncoding(1251)))
- {
- string i = first_file.ReadToEnd();
- tmp_file.Write(i);
- }
- }
- using(StreamWriter first_file = new StreamWriter("e:/practice/first.txt", false))
- {
- using(StreamReader second_file = new StreamReader("e:/practice/second.txt", Encoding.GetEncoding(1251)))
- {
- string i = second_file.ReadToEnd();
- first_file.Write(i);
- }
- }
- using(StreamWriter second_file = new StreamWriter("e:/practice/second.txt", false))
- {
- using(StreamReader tmp_file = new StreamReader("e:/practice/tmp.txt", Encoding.GetEncoding(1251)))
- {
- string i = tmp_file.ReadToEnd();
- second_file.Write(i);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement