Read a string from the keyboard, using Console.In directly : Console Input Output : Development Class C# Source Code


Custom Search

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

 

Read a string from the keyboard, using Console.In directly









    

/*
C#: The Complete Reference 
by Herbert Schildt 

Publisher: Osborne/McGraw-Hill (March 8, 2002)
ISBN: 0072134852
*/

// Read a string from the keyboard, using Console.In directly.  
 
using System;  
 
public class ReadChars2 { 
  public static void Main() { 
    string str; 
 
    Console.WriteLine("Enter some characters."); 
 
    str = Console.In.ReadLine(); 
 
    Console.WriteLine("You entered: " + str); 
  } 
}


           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Development Class
» Console Input Output