Advertisement
Guest User

Untitled

a guest
Mar 30th, 2015
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.IO;
  7.  
  8. namespace ConsoleApplication32
  9. {
  10. class Program
  11. {
  12. static void Main(string[] args)
  13. {
  14. int i = 0;
  15. string[] szöveg = new string[10];
  16. string[] szöveg2 = new string [100];
  17. StreamReader sr = new StreamReader("próba.txt", Encoding.Default);
  18. while (!sr.EndOfStream)
  19. {
  20. string próba = sr.ReadLine();
  21. szöveg[i] = próba;
  22. Console.WriteLine(szöveg[i]);
  23. i++;
  24. }
  25. sr.Close();
  26. for (int j = 0; j < szöveg2.Length; j++)
  27. {
  28. szöveg2 = szöveg[0].Split(' ');
  29. }
  30.  
  31.  
  32. foreach (string word in szöveg2)
  33. {
  34. Console.WriteLine(word);
  35. }
  36. Console.ReadLine();
  37. }
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement