public void ReadInput(string FilePath) { Console.WriteLine("Reading input..."); int columnsCount = 0; using (StreamReader srcheck = new StreamReader(FilePath)) { string firstLine = Convert.ToString(srcheck.ReadLine()); string[] splitArr = firstLine.Split(','); columnsCount = splitArr.Length; splitArr = null; srcheck.Close(); } using (StreamReader sr = new StreamReader(FilePath)) { for (int c = 0; c < columnsCount; c++) { this._inputDataset.Columns.Add("col" + c); } var DSFileContents = File.ReadAllLines(FilePath).ToList(); DSFileContents.ForEach(DSRow => _inputDataset.Rows.Add(DSRow.Split(','))); sr.Close(); } Console.WriteLine("...finished reading input"); }
public DSRowChangeEvent(DSRow row, global::System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; }