an anonymous user · August 01, 2020 · C#
using System;

namespace MyApplication
  class Program
    static void Main(string[] args)
      // Type your username and press enter
      Console.WriteLine("Enter username:");

      // Create a string variable and get user input from the keyboard and store it in the variable
      string userName = Console.ReadLine();

      // Print the value of the variable (userName), which will display the input value
      Console.WriteLine("Username is: " + userName);


Please sign up or log in to contribute to the discussion.