Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Net;
- using System.IO;
- using System.Diagnostics;
- namespace ROD_Deck_Builder
- {
- public class Cards
- {
- public List<Card> tableData;
- public List<Card> TableData
- {
- get { return tableData; }
- set { tableData = value; }
- }
- public Cards()
- {
- }
- }
- public class GetTable
- {
- public static Cards GetTableData(string tablepath)
- {
- Cards table = new Cards();
- using (StreamReader streamReader = new StreamReader(tablepath))
- {
- string singleLine;
- while ((singleLine = streamReader.ReadLine()) != null)
- {
- string[] splitApart = singleLine.Split(',');
- foreach (string line in splitApart)
- {
- Debug.WriteLine("line: " + line);
- table.TableData.Add(splitApart);
- }
- }
- }
- var reader = new StreamReader(File.OpenRead(@tablepath));
- while (!reader.EndOfStream)
- {
- var line = reader.ReadLine();
- var values = line.Split(';');
- }
- return table;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement