/* Use ReadLine () to complete the input and output of the console */using system;namespace test{class test1{static void Main (string[] args) {Console.Write (" Please enter: ");//output Please enter and do not wrap string read = Console.ReadLine ();//Assign the input to variable readconsole.write (" You enter the content: ");//Console output The content you entered is Console.WriteLine (read);//output read variable contents and line Console.ReadLine ();//return line wrap End console Program}}}
/*datetime format output */using system;namespace test{class test1{static void Main (string[] args) {DateTime dt = DateTime.Now; Console.WriteLine ("The DateTime at this time is:" +dt. ToString ("yyyy mm DD Day HH:mm:ss"));///time-date format output console.readline ();}}}
C # code 01--simple input and output of the console and format output of the date