using System;
using System.Collections;
using Microsoft.VisualBasic.FileIO;
public class Form
{
public string Rank { get; set; }
public string Name { get; set; }
public string Title { get; set; }
public string Country { get; set; }
public string Rating { get; set; }
public string Games { get; set; }
public string BYear { get; set; }
static void Main(string[] args)
{
using (TextFieldParser parser = new TextFieldParser(@"C:\Users\Admin\Desktop\Top100ChessPlayers.csv"))
{
List<string> list = new List<string>();
List<Form> files = new List<Form>();
parser.TextFieldType = FieldType.Delimited;
parser.SetDelimiters(";");
while (!parser.EndOfData)
{
//Process row
string[] fields = parser.ReadFields();
foreach (string field in fields)
{
list.Add(field);
}
}
}
}
}