Horje
c# read csv file Code Example
c# read csv file
StreamReader sr = new StreamReader(FilePath);
importingData = new Account();
string line;
string[] row = new string [5];
while ((line = sr.ReadLine()) != null)
{
    row = line.Split(',');

    importingData.Add(new Transaction
    {
        Date = DateTime.Parse(row[0]),
        Reference = row[1],
        Description = row[2],
        Amount = decimal.Parse(row[3]),
        Category = (Category)Enum.Parse(typeof(Category), row[4])
    });
}




Csharp

Related
how to generate random unique id in c# Code Example how to generate random unique id in c# Code Example
c# get type of class Code Example c# get type of class Code Example
how to print something in c# Code Example how to print something in c# Code Example
c# web api return image file Code Example c# web api return image file Code Example
HOW TO RETURN CELL VALUE FROM EXCEL IN C# Code Example HOW TO RETURN CELL VALUE FROM EXCEL IN C# Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11