Initialcommit
This commit is contained in:
24
TestAPP/Program.cs
Normal file
24
TestAPP/Program.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
// 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!");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user