using System;
namespace clases{
public class CarSalesman{
private string firstName;
private string lastName;
public CarSalesman(){
Console.WriteLine("Objeto CarSalesman creado e inicializado");
}
public CarSalesman(string firstName, string lastName){
this.firstName = firstName;
this.lastName = lastName;
}
public string FirstName{
get; set;
}
public string LastName{
get; set;
}
public string FullName{
get{
return string.Format("{0} {1}",this.firstName, this.lastName);
}
}
}
}
Ejemplo de clase en C#
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.