Advertisement
Guest User

Untitled

a guest
Dec 13th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. private void Read_btn_Click(object sender, RoutedEventArgs e)
  2. {
  3. String[] lines = File.ReadAllLines("C:\\Users\\Student\\Desktop\\big.txt");
  4. List<string> words = new List<string>();
  5.  
  6. foreach (string l in lines)
  7. {
  8. string[] lineWords;
  9. lineWords = l.Split(new char[] { '.', '?', '!', ' ', ';', ':', ',', '*'}, StringSplitOptions.RemoveEmptyEntries);
  10.  
  11. foreach (string word in lineWords)
  12. {
  13. words.Add(word);
  14. }
  15. }
  16.  
  17. ListView.ItemsSource = words;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement