Ejemplo n.º 1
0
        public void TestWhereLessThan()
        {
            CsvParser csv = new CsvParser("myfile.csv");
            var       res = csv.WhereLessThan("status", 500);

            TestWhereMethod(res, 3, new int[] { 0, 1, 2 });
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            CsvParser csv = new CsvParser("myfile.csv");

            if (!csv.IsEmpty)
            {
                int count = csv.Count;
                for (int i = 0; i < csv.Count; ++i)
                {
                    dynamic row = csv[i];
                    Console.WriteLine("{0}: {1}", row.time, row.result);
                }
                foreach (CsvRow row in csv)
                {
                    Console.WriteLine("{0}: {1}", row["time"], row["result"]);
                }
            }
            List <CsvRow> matches = csv.WhereEquals("result", "OK");

            matches = csv.WhereGreaterThan("status", 200);
            matches = csv.WhereLessThan("status", 500);
        }