Social Icons

martes, 2 de agosto de 2022

Aplicación en C# con Array de Objetos

 namespace ConsoleApp27

{

    internal class Program

    {

        static void Main(string[] args)

        {

            Shapefile[] gdb = new Shapefile[3];

            gdb[0] = new Shapefile("vias", "line", "UTM Z18S");

            gdb[1] = new Shapefile("poblados", "point", "UTM Z18S");

            gdb[2] = new Shapefile("locacion", "polygon", "UTM Z18S");

            gdb[0].getShapefile();

            gdb[1].getShapefile();

            gdb[2].getShapefile();


           


        }   

    }


    class Shapefile

    {

        string nombre;

        string geometria;

        string sistemaRef;

        

        

        public Shapefile(string nombre, string geometria, string sistemaRef)

        {

            this.nombre = nombre;   

            this.geometria = geometria;

            this.sistemaRef = sistemaRef;


        }


        public void getShapefile()

        {

            Console.WriteLine("Nombre: "+nombre+" /Geometria: "+geometria+"/ Sistema: "+sistemaRef);

        }




    }

}

No hay comentarios.:

Publicar un comentario

PELICULAS PARA VER

  Inexactitudes fácticas en las películas (msn.com) https://www.msn.com/es-co/entretenimiento/famosos/inexactitudes-f%C3%A1cticas-en-las-pel...

 
 
Blogger Templates