Files
test-csharp/TestAPP/Program.cs
2024-09-15 09:25:06 +02:00

25 lines
577 B
C#

// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");
// Type your username and press enter
Console.WriteLine("Enter username:");
// Create a string variable and get user input from the keyboard and store it in the variable
string? userName = "";
while(userName?.Length == 0)
{
userName = Console.ReadLine();
if(userName?.Length >= 1)
{
Console.WriteLine("Deiner Eingabe war: {0}", userName);
}
else
{
Console.WriteLine("Keine Eingabe getätigt!");
}
}