c # variable small example: Analog user login

 1 using System;
 2 using System.Collections.Generic;
 3 using System.Linq;
 4 using System.Text;
 5 using System.Threading.Tasks;
 6 
 7 namespace ConsoleApplication4
 8 {
 9     class Program
10     {
11         static void Main(string[] args)
12         {
13             Console.WriteLine("欢迎进入明日官网\n");
14             Console.WriteLine(" Please enter a user name: " );
 15              String name = Console.ReadLine ();
 16              Console.WriteLine ( " currently logged in user: " + name);
 . 17              Console.Read ();
 18 is  
. 19          }
 20 is      }
 21 is }

 operation result:

 

Guess you like

Origin www.cnblogs.com/ZHANG576433951/p/11128907.html