public void ReadCSVContent() { string directory = Directory.GetCurrentDirectory() + "\\Data"; String[] files = Directory.GetFiles(directory); if (files.Length > 0) { CSVHelper helper = new CSVHelper(files[0], true); IEnumerable <Object> list = helper.GetCsvContents(func); Console.WriteLine($"we process the file with success - {list.Count()} registros encontrados!"); } else { Console.WriteLine($"No file was found in {directory}"); } }