Example #1
0
        static void Main(string[] args)
        {
            Guarda3 <string> save1 = new Guarda3 <string>();

            save1.SetItem(0, "Broas");
            save1.SetItem(1, "Biscoitos");
            save1.SetItem(2, "Caracól");

            Console.WriteLine($"{save1.GetItem(0)}\n{save1.GetItem(1)}\n" +
                              $"{save1.GetItem(2)}");
        }
Example #2
0
        static void Main(string[] args)
        {
            Guarda3 <string> keep3Strings = new Guarda3 <string>();
            Guarda3 <float>  keep3Floats  = new Guarda3 <float>();

            keep3Strings.SetItem(0, "Ola");
            keep3Strings.SetItem(2, "Adeus");

            keep3Floats.SetItem(1, 3.4f);

            Console.WriteLine("'{0}'\n'{1}'\n'{2}'",
                              keep3Strings.GetItem(0),
                              keep3Strings.GetItem(1),
                              keep3Strings.GetItem(2));
            Console.WriteLine("'{0}'\n'{1}'\n'{2}'",
                              keep3Floats.GetItem(0),
                              keep3Floats.GetItem(1),
                              keep3Floats.GetItem(2));
        }
Example #3
0
        static void Main(string[] args)
        {
            Guarda3 <int> g3 = new Guarda3 <int>();

            g3.SetItem(0, 23);

            int i = g3.GetItem(0);

            Console.WriteLine(i);
            Console.ReadKey();
        }
        private static void Main(string[] args)
        {
            Guarda3<string> g3s = new Guarda3<string>();
            Guarda3<float> g3f = new Guarda3<float>();

            g3s.SetItem(0, "Olá");
            g3s.SetItem(2, "Adeus");

            g3f.SetItem(2, 54.6f);

            Console.WriteLine("Strings");
            Console.WriteLine($"\t{g3s.GetItem(0)}");
            Console.WriteLine($"\t{g3s.GetItem(1)}");
            Console.WriteLine($"\t{g3s.GetItem(2)}");

            Console.WriteLine("Floats");
            Console.WriteLine($"\t{g3f.GetItem(0)}");
            Console.WriteLine($"\t{g3f.GetItem(1)}");
            Console.WriteLine($"\t{g3f.GetItem(2)}");
        }