Answers for "C# How to read users input and display it"

C#
0

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);
Posted by: Guest on February-09-2022

Code answers related to "C# How to read users input and display it"

C# Answers by Framework

Browse Popular Code Answers by Language