input in c# code example

Example 1: how to print statement in c#

Debug.Log("This is C# programming"); //for Unity

Example 2: how to make an input in c#

string myName;

Console.WriteLine("Please, enter your full name here: ");
myName = Console.ReadLine();
Console.WriteLine("Hello, Mr. " + myName + "!");

Console.Key();

/* OR */

Console.WriteLine("Please, enter your full name: ");
string myName = Console.ReadLine();
Console.WriteLine("Hello, Mr. " + myName + "!");

Console.ReadKey();

Example 3: c# input

Console.Write("words");
input = Console.ReadLine();