Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Visual C# Console Application Question

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 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 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

×