Advertisement
Guest User

Untitled

a guest
May 19th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1.  
  2. //перенос содержимого файла в массив строк
  3. public static string[] StringsFromFile(string path)
  4. {
  5. List<string> AllLinesList = new List<string>();
  6. using (StreamReader sr = File.OpenText(path))
  7. {
  8. string newline;
  9. while ((newline = sr.ReadLine()) != null)
  10. AllLinesList.Add(newline);
  11. }
  12. string[] AllLines = AllLinesList.ToArray();
  13. return AllLines;
  14. }
  15.  
  16.  
  17. public static string Poly(string[] arr)
  18. {
  19. return arr[0];
  20. }
  21.  
  22. public static string Equals(string[] arr)
  23. {
  24. string all = "";
  25. for (int i = 1; i < arr.Length; i++)
  26. {
  27. all += arr[i];
  28. all += "\r";
  29. }
  30. return all;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement