martes, 28 de septiembre de 2010

Clase Perosna C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
class Persona
{
string NOM;
string PROF;

public Persona()
{
NOM = " ";
PROF = " ";
}


public Persona(string nom, string prof)
{
NOM = nom;//return nom;
PROF = prof;
}

public string nom
{
get{return nom;}
set{ nom= value;}
}

public string prof
{
get { return prof; }
set { prof = value; }
}


public override string ToString()
{
return NOM+" "+PROF;
}
}
}

No hay comentarios:

Publicar un comentario