示例#1
0
        static void Main(string[] args)
        {
            // Herencia de genericos

            TestA <string> a = new TestA <string>();

            a.Meta1 = "Hola";
            a.Meta2 = "Mundo";
            a.AddRange(new TestA <string>()
            {
                "a", "b", "c", "d"
            });
            List <string> b     = new List <string>();
            var           meta1 = "Hola";
            var           meta2 = "Mundo";

            b.AddRange(new List <string>()
            {
                "a", "b", "c", "d"
            });

            //Metodos de Extención

            Coninar cocina = new Coninar();

            cocina.Freir();
            cocina.Hornear();
            cocina.Quemar();
            cocina.Hervir();
            cocina.Servir();
        }
示例#2
0
 public static List <string> Servir(this Coninar c)
 {
     return(new List <string>());
 }