Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

get input c#

Console.ReadLine();
//will read what was input to the command
Comment

C# How to read users input and display it

// Reading users Input

            // Here the code will save the input of the user, To the variable (Input)
            string input = Console.ReadLine();

            // And heres how we Display the saved input
            Console.WriteLine(input);
            // or
            Console.WriteLine("Some Text {0}", input);


            // Example where it could be used
            Console.WriteLine("Type in your name please!");

            string nameInput = Console.ReadLine();

            Console.WriteLine("Welcome {0}!", nameInput);
Comment

C# Getting User Input

Console.Write("Enter your name:");
           string name = Console.ReadLine();
            Console.Write("Enter your age:");
            string age = Console.ReadLine();
           
            Console.WriteLine("Hello" + name + " you are " + age);
			Console.ReadLine();
Comment

PREVIOUS NEXT
Code Example
Csharp :: string to datetime c# 
Csharp :: remove items from one list in another c# 
Csharp :: dns ttl meaning 
Csharp :: public gameobject unity 
Csharp :: Squares of a Sorted Array 
Csharp :: c# convert datetime to unix timestamp 
Csharp :: Unity Interstitial ad C# 
Csharp :: c# do while 
Csharp :: valid URL check in c# 
Csharp :: unity custom editor 
Csharp :: creating a streamwiter file C# 
Csharp :: c# dictionary keys to list 
Csharp :: checking if character is a digit or not in c# 
Csharp :: c# function return 
Csharp :: c# unescape string 
Csharp :: c# sort for loop 
Csharp :: long number multiplication 
Csharp :: c# tell if list object is empty 
Csharp :: unity keep screen always on 
Csharp :: c# get list item in random order 
Csharp :: text read C# 
Csharp :: asp.net response.redirect new tab 
Csharp :: get controller name from ActionExecutingContext .net 4.x 
Csharp :: if set active == false unity 
Csharp :: c# allowedusernamecharacters 
Csharp :: c# datagridview hide header 
Csharp :: c# funtion 
Csharp :: .net 6 autofac 
Csharp :: take space separated input in c# 
Csharp :: how to use curl in asp.net c# 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =