Advertisement
tankcr

Untitled

Jun 14th, 2014
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.45 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.Net;
  7. using System.IO;
  8. using System.Diagnostics;
  9.  
  10. namespace ROD_Deck_Builder
  11. {
  12.     public class Cards
  13.     {
  14.         public List<Card> tableData;
  15.  
  16.         public List<Card> TableData
  17.         {
  18.             get { return tableData; }
  19.             set { tableData = value; }
  20.         }
  21.  
  22.         public Cards()
  23.         {
  24.  
  25.         }
  26.     }
  27.     public class GetTable
  28.     {
  29.         public static Cards GetTableData(string tablepath)
  30.         {
  31.             Cards table = new Cards();
  32.             using (StreamReader streamReader = new StreamReader(tablepath))
  33.             {
  34.                 string singleLine;
  35.                 while ((singleLine = streamReader.ReadLine()) != null)
  36.                 {
  37.                     string[] splitApart = singleLine.Split(',');
  38.                     foreach (string line in splitApart)
  39.                     {
  40.                         Debug.WriteLine("line: " + line);
  41.                         table.TableData.Add(splitApart);
  42.                     }
  43.  
  44.                 }
  45.  
  46.             }
  47.             var reader = new StreamReader(File.OpenRead(@tablepath));
  48.             while (!reader.EndOfStream)
  49.             {
  50.                 var line = reader.ReadLine();
  51.                 var values = line.Split(';');
  52.                
  53.             }
  54.  
  55.             return table;
  56.         }
  57.  
  58.     }
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement