Answers for "c# console get input from user"

C#
0

read user input console app c#

string val;
Console.Write("Enter integer: ");
val = Console.ReadLine();
Now convert it to integer −

int a = Convert.ToInt32(val);
Console.WriteLine("Your input: {0}",a);
Posted by: Guest on July-14-2021
1

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();
Posted by: Guest on November-18-2020

Code answers related to "c# console get input from user"

C# Answers by Framework

Browse Popular Code Answers by Language