Exemple #1
0
        static void Main(string[] args)
        {
            Cases a = new Cases();

            a.Add("keyA", "c");
            a.Add("keyB", "b");
            a.Add("keyC", "a");
            foreach (KeyValuePair <string, Reading> x in a)
            {
                Console.WriteLine(x);
            }
        }
Exemple #2
0
        static void Main(string[] args)
        {
            Cases a = new Cases();

            a.Add("keyA", "01:00");
            a.Add("keyB", "11:30");
            a.Add("keyC", "06:20");
            foreach (KeyValuePair <string, Reading> x in a)
            {
                Console.WriteLine("{0}: {1}", x.Key, x.Value);
            }
        }
Exemple #3
0
        static void Main(string[] args)
        {
            Cases a = new Cases();

            a.Add("aa", "x");
            a.Add("xd", "x");
            a.Add("ea2", "x");
            foreach (KeyValuePair <string, Reading> x in a)
            {
                Console.WriteLine(x);     // prints the pairs according to keys sorted alphabetically
            }
        }