diff --git a/Program.cs b/Program.cs index d0e2789..6f6b112 100644 --- a/Program.cs +++ b/Program.cs @@ -29,7 +29,7 @@ class Program { break; case 3: Console.Clear(); - + Submenu(); Pausa(); break; case 4: @@ -105,5 +105,54 @@ class Program { return ritorno; } - + static void Submenu(){ + Console.Clear(); + string frase, input; + int scelta; + + Console.Write("Inserire una frase: "); + input = Console.ReadLine(); + Console.Clear(); + + do { + frase = input; + Console.WriteLine($"Frase corrente: {frase}"); + Console.WriteLine(); + Console.WriteLine("Inserire un'opzione:"); + Console.WriteLine("1. Converti in minuscolo"); + Console.WriteLine("2. Converti in maiuscolo"); + Console.WriteLine("3. Sostituisci \'.\' con \\n"); + Console.WriteLine("0. Esci"); + Console.Write("Scelta: "); + scelta = Convert.ToInt32(Console.ReadLine()); + + switch (scelta) { + case 0: + break; + case 1: + Console.Clear(); + frase = frase.ToLower(); + Console.WriteLine($"Frase in minuscolo: {frase}"); + Pausa(); + break; + case 2: + Console.Clear(); + frase = frase.ToUpper(); + Console.WriteLine($"Frase in maiuscolo: {frase}"); + Pausa(); + break; + case 3: + Console.Clear(); + Console.WriteLine($"Frase con \\n: {frase.Replace(".", "\\n")}\n\n"); + Console.WriteLine($"Frase con \\n interpretato: {frase.Replace(".", "\n")}"); + Pausa(); + break; + default: + Console.WriteLine("Opzione non valida."); + Pausa(); + break; + } + } + while (scelta != 0); + } } diff --git a/bin/Debug/net9.0/strings_1.dll b/bin/Debug/net9.0/strings_1.dll index 33e24e8..51dd907 100644 Binary files a/bin/Debug/net9.0/strings_1.dll and b/bin/Debug/net9.0/strings_1.dll differ diff --git a/bin/Debug/net9.0/strings_1.pdb b/bin/Debug/net9.0/strings_1.pdb index bdd982a..45c176c 100644 Binary files a/bin/Debug/net9.0/strings_1.pdb and b/bin/Debug/net9.0/strings_1.pdb differ diff --git a/obj/Debug/net9.0/ref/strings_1.dll b/obj/Debug/net9.0/ref/strings_1.dll index 1a544cf..50fa42f 100644 Binary files a/obj/Debug/net9.0/ref/strings_1.dll and b/obj/Debug/net9.0/ref/strings_1.dll differ diff --git a/obj/Debug/net9.0/refint/strings_1.dll b/obj/Debug/net9.0/refint/strings_1.dll index 1a544cf..50fa42f 100644 Binary files a/obj/Debug/net9.0/refint/strings_1.dll and b/obj/Debug/net9.0/refint/strings_1.dll differ diff --git a/obj/Debug/net9.0/strings_1.AssemblyInfo.cs b/obj/Debug/net9.0/strings_1.AssemblyInfo.cs index 08d44ad..c7e3c11 100644 --- a/obj/Debug/net9.0/strings_1.AssemblyInfo.cs +++ b/obj/Debug/net9.0/strings_1.AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("strings_1")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+9a6a7d033df24618f23d8c678ad89ad9da11fd5f")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+fc5e00d760f79e678e9cd4784cb86739463eae8a")] [assembly: System.Reflection.AssemblyProductAttribute("strings_1")] [assembly: System.Reflection.AssemblyTitleAttribute("strings_1")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/obj/Debug/net9.0/strings_1.AssemblyInfoInputs.cache b/obj/Debug/net9.0/strings_1.AssemblyInfoInputs.cache index c7ccdbe..92ba4fb 100644 --- a/obj/Debug/net9.0/strings_1.AssemblyInfoInputs.cache +++ b/obj/Debug/net9.0/strings_1.AssemblyInfoInputs.cache @@ -1 +1 @@ -026fc32c5f2b08f1f28bf8d9d499576953af691b4c04f7de6e6d7956b19089a8 +e3ce3c7de95ef6326cdd83691d152ba9a50ea4fbf3aaa1a3ecd06cdf889c90e9 diff --git a/obj/Debug/net9.0/strings_1.dll b/obj/Debug/net9.0/strings_1.dll index 33e24e8..51dd907 100644 Binary files a/obj/Debug/net9.0/strings_1.dll and b/obj/Debug/net9.0/strings_1.dll differ diff --git a/obj/Debug/net9.0/strings_1.pdb b/obj/Debug/net9.0/strings_1.pdb index bdd982a..45c176c 100644 Binary files a/obj/Debug/net9.0/strings_1.pdb and b/obj/Debug/net9.0/strings_1.pdb differ