Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

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);
 
PREVIOUS NEXT
Tagged: #How #read #users #input #display
ADD COMMENT
Topic
Name
2+3 =