Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
public void LoadData(String fileName) { CultureInfo provider = CultureInfo.InvariantCulture; ReadCSV csv = new ReadCSV(fileName, true, ','); while (csv.Next()) { String dateString = csv.Get("date"); DateTime date = DateTime.ParseExact(dateString, "d", provider); double amount = csv.GetDouble("volume"); outputBox.Items.Insert(0, date); /*FinancialSample sample = new FinancialSample(); sample.SetAmount(amount); sample.SetDate(date); this.samples.Add(sample);*/ } csv.Close(); //this.samples.Sort(); }
This paste will be private.
From the Design Piracy series on my blog: