List<string> bandas = new List<string>{"C#", "JAVA", "JavaScript"};
void apresentacao()
{
//Console.Clear();
Console.WriteLine(@"
██╗░░░░░██╗░██████╗████████╗░█████╗░
██║░░░░░██║██╔════╝╚══██╔══╝██╔══██╗
██║░░░░░██║╚█████╗░░░░██║░░░███████║
██║░░░░░██║░╚═══██╗░░░██║░░░██╔══██║
███████╗██║██████╔╝░░░██║░░░██║░░██║
╚══════╝╚═╝╚═════╝░░░░╚═╝░░░╚═╝░░╚═╝");
Console.WriteLine("\n");
}
void listarBandas(List<string> bandas)
{
for(int i = 0; i < bandas.Count; i++ )
{
Console.WriteLine($"\t| {i + 1} - {bandas[i]} ");
}
Console.WriteLine("\n");
// foreach(var banda in bandas)
// {
// Console.WriteLine($"\n{banda}");
// }
}
void adicionarBandas(string novaBanda)
{
bandas.Add(novaBanda);
}
string menu(string opcaoMenu)
{
switch(opcaoMenu)
{
case "-1":
Console.WriteLine("Que item deseja excluir ? ");
opcaoMenu = Console.ReadLine();
bandas.Remove(opcaoMenu);
break;
default:
bandas.Add(opcaoMenu);
break;
}
return opcaoMenu;
}
do
{
Console.Clear();
apresentacao();
listarBandas(bandas);
Console.Write($"Presione -1 para excluir item da lista : \n\n");
Console.Write("Digite o nome do novo item: ");
string opcaoMenu = Console.ReadLine();
menu(opcaoMenu);
} while(true);