Jump to content

Visual C# Console Application Question

264090_1454182163

I'm trying to do a visual c# console application which requires the user to input something, it stores that in a string and then spits back out a bunch of data depending on what string they input, I can't seem to be able to the program take the data and store in a variable, pls help

Link to comment
Share on other sites

Link to post
Share on other sites

14 hours ago, 264090_1454182163 said:

I'm trying to do a visual c# console application which requires the user to input something, it stores that in a string and then spits back out a bunch of data depending on what string they input, I can't seem to be able to the program take the data and store in a variable, pls help

	using System;
	namespace ConsoleApplication1
	{
	    class Program
	    {
	        static void Main(string[] args)
	        {
	            string userData = "";
	            Console.Write("Please enter some data and hit enter: ");
	            userData = Console.ReadLine();
	            Console.WriteLine(userData);
	            Console.ReadKey();
	        }
	    }
	}
	 
	

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×