Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.IO;
- namespace sampletext
- {
- class Sampletext
- {
- static void Main()
- {
- //consider as punctuations only: “.”, “,”, “!”, “?” and “:”.
- string[] words = File.ReadAllText(@"C:\Users\Thinkpad\Desktop\sampletext\sample_text.txt")
- .Split(new char[] { '.', ',', '!', '?', ':', },
- StringSplitOptions.RemoveEmptyEntries);
- Console.WriteLine(string.Join("", words));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement