Rimozione variabili inutili
This commit is contained in:
parent
36801822d8
commit
4110767bb2
14
Program.cs
14
Program.cs
@ -2,20 +2,14 @@
|
|||||||
namespace Rubrica_Miglioria;
|
namespace Rubrica_Miglioria;
|
||||||
|
|
||||||
class Program {
|
class Program {
|
||||||
static void Main(string[] args) {
|
static void Main() {
|
||||||
Console.Clear();
|
Console.Clear();
|
||||||
const int DIMENSIONE_RUBRICA = 100;
|
const int DIMENSIONE_RUBRICA = 100;
|
||||||
int scelta = 0;
|
int scelta;
|
||||||
string nome = "";
|
|
||||||
string numeroditelefono;
|
|
||||||
bool rubricaNonVuota = false;
|
bool rubricaNonVuota = false;
|
||||||
bool error;
|
bool error;
|
||||||
int contatore = 0;
|
int contatore = 0;
|
||||||
string ricerca;
|
string ricerca;
|
||||||
string[] nomi = new string[DIMENSIONE_RUBRICA];
|
|
||||||
string[] numeriditelefono = new string[DIMENSIONE_RUBRICA];
|
|
||||||
Voce singolavoce = null;
|
|
||||||
Voce[] voci = new Voce[DIMENSIONE_RUBRICA];
|
|
||||||
Rubrica rubrica = new Rubrica(DIMENSIONE_RUBRICA);
|
Rubrica rubrica = new Rubrica(DIMENSIONE_RUBRICA);
|
||||||
do {
|
do {
|
||||||
Console.WriteLine("1)Aggiungi nuova voce in rubrica");
|
Console.WriteLine("1)Aggiungi nuova voce in rubrica");
|
||||||
@ -30,6 +24,9 @@ class Program {
|
|||||||
Console.WriteLine($"Limite di {DIMENSIONE_RUBRICA} voci nella rubrica raggiunta");
|
Console.WriteLine($"Limite di {DIMENSIONE_RUBRICA} voci nella rubrica raggiunta");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
string nome;
|
||||||
|
string numeroditelefono;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
string? message;
|
string? message;
|
||||||
error = true;
|
error = true;
|
||||||
@ -178,7 +175,6 @@ class Program {
|
|||||||
ritorno = $"Questo {(p_tipologia ? "nome" : "numero di telefono")} esiste già nella rubrica.";
|
ritorno = $"Questo {(p_tipologia ? "nome" : "numero di telefono")} esiste già nella rubrica.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return ritorno;
|
return ritorno;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user