Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.IO;
- using System.Text;
- using System.Threading.Tasks;
- namespace _05.WriteToFile
- {
- class Program
- {
- static void Main(string[] args)
- {
- var text = File.ReadAllText("sample_text.txt").Split(new[] { '.', ',', '!', '?', ':' }, StringSplitOptions.RemoveEmptyEntries).ToList();
- if (!File.Exists("outputter.txt"))
- {
- File.WriteAllText("output.txt", string.Join(" ", text));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment