Console.ReadLine();
//will read what was input to the command
Console.Write("words");
input = Console.ReadLine();
using System;
namespace Sample
{
class Test
{
public static void Main(string[] args)
{
string testString;
Console.Write("Enter a string - ");
testString = Console.ReadLine();
Console.WriteLine("You entered '{0}'", testString);
}
}
}
// 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());
// 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());