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 DocGhiFile
- {
- class Program
- {
- static void Main(string[] args)
- {
- FileStream fs = new FileStream(@"D:\CS\test\leo.txt", FileMode.Create, FileAccess.Write, FileShare.None);
- StreamWriter sw = new StreamWriter(fs);
- Console.WriteLine("Moi ban nhap 1 dong: ");
- string str = Console.ReadLine();
- sw.WriteLine(str);
- sw.Flush();
- sw.Close();
- fs.Close();
- }
- }
- }
Add Comment
Please, Sign In to add comment