Guest User

Untitled

a guest
Nov 15th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. StreamReader f1 = new StreamReader(args[0]);
  2. StreamReader f2 = new StreamReader(args[1]);
  3. StreamWriter p = new StreamWriter(args[2]);
  4. double[] array1 = new double[20];
  5. double[] array2 = new double[20];
  6. double[] array3 = new double[20];
  7.  
  8. string line;
  9. int index;
  10. double value;
  11.  
  12. while ((line = f1.ReadLine()) != null)
  13. {
  14. string[] currentLine = line.Split('|');
  15. index = Convert.ToInt16(currentLine[0]);
  16. value = Convert.ToDouble(currentLine[1]);
  17. array1[index] = value;
  18. }
  19.  
  20. static void Main(String[] args)
  21. {
  22. // Create variables to hold the 3 elements of each item that you will read from the file
  23. // Create variables for all 3 files (2 for READ, 1 for WRITE)
  24. int ID;
  25. string InvName;
  26. int Number;
  27.  
  28. string IDString;
  29. string NumberString;
  30.  
  31. string line;
  32.  
  33. List<InventoryNode> Inventory = new List<InventoryNode>();
  34. InventoryNode Item = null;
  35.  
  36. StreamReader f1 = new StreamReader(args[0]);
  37. StreamReader f2 = new StreamReader(args[1]);
  38. StreamWriter p = new StreamWriter(args[2]);
  39.  
  40.  
  41. // Read each item from the Update File and process the data
  42.  
  43. //Data is separated by pipe |
Add Comment
Please, Sign In to add comment