public void parseCSV(string path, bool headerOnly, int numberOfHeaderLines) { try { using (StreamReader readFile = new StreamReader(path)) { csvFileHeader = new CSVFileHeader(); csvFileHeader.parseHeader(readFile, numberOfHeaderLines); if (!headerOnly) { csvFileData = new CSVFileData(); csvFileData.parseData(readFile); } } } catch (CSVFileException e) { throw e; } catch (Exception e) { throw new CSVFileException(e); // MessageBox.Show(e.Message); } }
public void parseCSV(string path,bool headerOnly,int numberOfHeaderLines) { try { using (StreamReader readFile = new StreamReader(path)) { csvFileHeader = new CSVFileHeader(); csvFileHeader.parseHeader(readFile, numberOfHeaderLines); if (!headerOnly) { csvFileData = new CSVFileData(); csvFileData.parseData(readFile); } } } catch (CSVFileException e) { throw e; } catch (Exception e) { throw new CSVFileException(e); // MessageBox.Show(e.Message); } }