Esempio n. 1
0
        private static void Main(string[] args)
        {
            Guarda3 <string> g3s = new Guarda3 <string>()
            {
                "Olá",
                "lalala",
                "Adeus"
            };

            Guarda3 <float> g3f = new Guarda3 <float>()
            {
                2f,
                54.6f,
                1f
            };

            Console.WriteLine("Strings");
            foreach (string s in g3s)
            {
                Console.WriteLine($"\t{s}");
            }

            Console.WriteLine("Floats");
            foreach (float f in g3f)
            {
                Console.WriteLine($"\t{f}");
            }
        }
        static void Main(string[] args)
        {
            Guarda3 <string> keep3Strings =
                new Guarda3 <string>()
            {
                "Ola", "Adeus", "!"
            };
            Guarda3 <float> keep3Floats =
                new Guarda3 <float>()
            {
                3.4f, 1.5f, -1.6f
            };

            foreach (string s in keep3Strings)
            {
                Console.WriteLine($"'{s}'");
            }

            foreach (float f in keep3Floats)
            {
                Console.WriteLine($"'{f}'");
            }
        }