SHARE
TWEET

Sampletext

a guest Jun 30th, 2017 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.IO;
  3.  
  4. namespace sampletext
  5. {
  6.     class Sampletext
  7.     {
  8.         static void Main()
  9.         {
  10.             //consider as punctuations only: “.”, “,”, “!”, “?” and “:”.
  11.             string[] words = File.ReadAllText(@"C:\Users\Thinkpad\Desktop\sampletext\sample_text.txt")
  12.                 .Split(new char[] { '.', ',', '!', '?', ':', },
  13.                 StringSplitOptions.RemoveEmptyEntries);
  14.  
  15.             Console.WriteLine(string.Join("", words));
  16.         }
  17.     }
  18. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top