public bool MoveNext() { // TODO: Implement this method var loop = true; while (loop) { if (tr.Peek() < 0) { return false; } var table = new employers(); var line = tr.ReadLine().Split('\t'); //Console.WriteLine(line[0]); if (line.Count() == 26) { _current = new ExpandoObject(); _current.em_employer_id = line[0]; _current.em_name = line[4]; _current.em_city = line[7]; _current.em_state = line[8]; _current.em_sic = line[21]; table.Insert(_current); loop = false; } } return true; }
private static void runthis() { var dict = new Dictionary<string, dynamic>(); var pocs = new POCS(); var table = new pocs(); Int64 i = 0; if (table.Count() == 0) { while (pocs.MoveNext()) { i++; if (!dict.ContainsKey(pocs.Current.po_named_insured)) { //Console.WriteLine(String.Format("{0}", pocs.Current.po_named_insured.ToString())); if (pocs.Current.po_named_insured != "0" && !String.IsNullOrEmpty(pocs.Current.po_named_insured)) { dict.Add(pocs.Current.po_named_insured, pocs.Current.po_named_insured); table.Insert(pocs.Current); } } } Console.WriteLine(String.Format("{0} Records", i)); } var emptable = new employers(); if (emptable.Count() == 0) { var employers = new Employers(); while (employers.MoveNext()) { //Console.WriteLine(employers.Current.em_name); } } Console.WriteLine(String.Format("{0} Records", i)); }