Illustrates how to read a string entered using the keyboard : Console Input Output : Development Class C# Source Code


Custom Search

C# Source Code » Development Class » Console Input Output »

 

Illustrates how to read a string entered using the keyboard









    

/*
Mastering Visual C# .NET
by Jason Price, Mike Gunderloy

Publisher: Sybex;
ISBN: 0782129110
*/
/*
  Example2_14.cs illustrates how to
  read a string entered using the keyboard
*/

public class Example2_141
{

  public static void Main()
  {

    System.Console.Write("Enter a string: ");
    string myString = System.Console.ReadLine();
    System.Console.WriteLine("You entered " + myString);

  }

}


           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Development Class
» Console Input Output