Answers for "get input on c#"

C#
0

c# input

// Type your username and press enter
Console.Write("Type your username: ");
// Create a string variable and get user input from the keyboard and store it in the variable
String name = Console.ReadLine();
// Print the value of the variable (userName), which will display the input value
Console.WriteLine(name);
// or try this              
// Type your username and press enter
Console.Write("Type your username: ");
//Prints the username
Console.WriteLine(Console.ReadLine());
Posted by: Guest on December-11-2021

C# Answers by Framework

Browse Popular Code Answers by Language