36 lines
1.1 KiB
C#
36 lines
1.1 KiB
C#
namespace vacanzeEstive_rubricaTelefonica;
|
|
|
|
class Voce {
|
|
string nome;
|
|
string cognome;
|
|
string telefono;
|
|
string cellulare;
|
|
string email;
|
|
string indirizzo;
|
|
|
|
public Voce(string p_nome, string p_cognome, string p_telefono, string p_cellulare, string p_email, string p_indirizzo) {
|
|
this.nome = p_nome;
|
|
this.cognome = p_cognome;
|
|
this.telefono = p_telefono;
|
|
this.cellulare = p_cellulare;
|
|
this.email = p_email;
|
|
this.indirizzo = p_indirizzo;
|
|
}
|
|
|
|
public void MostraVoce() {
|
|
Console.WriteLine($"\tNome: {this.nome}");
|
|
Console.WriteLine($"\tCognome: {this.cognome}");
|
|
Console.WriteLine($"\tTelefono: {this.telefono}");
|
|
Console.WriteLine($"\tCellulare: {this.cellulare}");
|
|
Console.WriteLine($"\tEmail: {this.email}");
|
|
Console.WriteLine($"\tIndirizzo: {this.indirizzo}");
|
|
}
|
|
|
|
public string[] GetVoceAsArray() {
|
|
return [this.nome, this.cognome, this.telefono, this.cellulare, this.email, this.indirizzo];
|
|
}
|
|
|
|
public string GetNome() {
|
|
return this.nome;
|
|
}
|
|
} |