Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2015
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 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.  
  7. namespace ConsoleApplication3
  8. {
  9. class Program
  10. {
  11. static void Main()
  12. {
  13. string input = @"c:temptest.txt";
  14. Cawk.Execute(input);
  15. }
  16. }
  17. }
  18.  
  19. using System;
  20. using System.Collections.Generic;
  21. using System.IO;
  22.  
  23. namespace ConsoleApplication3
  24. {
  25. public static class Cawk
  26. {
  27. public static IEnumerable<Dictionary<string, object>> Execute(StreamReader input)
  28. {
  29. Dictionary<string, object> row = new Dictionary<string, object>();
  30.  
  31. string line;
  32. //string[] lines = File.ReadAllLines(path);
  33.  
  34. //read all rows
  35. while ((line = input.ReadLine()) != null)
  36. {
  37.  
  38. Cawk.Execute(new StreamReader(@"c:temptest.txt"))
  39.  
  40. using (var sr = new StreamReader(@"c:temptest.txt"))
  41. {
  42. Cawk.Execute(sr);
  43. }
  44.  
  45. var sr = new System.IO.StreamReader(@"c:temptest.txt");
  46. Cawk.Execute(sr);
  47.  
  48. Cawk.Execute(File.OpenText(@"c:temptest.txt"));
  49.  
  50. string input = @"c:temptest.txt";
  51. Cawk.Execute(new System.IO.StreamReader(input));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement