Read a character from the keyboard





/*

C#: The Complete Reference 

by Herbert Schildt 



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

ISBN: 0072134852

*/

// Read a character from the keyboard. 

 

using System; 

 

public class KbIn {   

  public static void Main() { 

    char ch; 

 

    Console.Write("Press a key followed by ENTER: ")

 

    ch = (charConsole.Read()// get a char 

    

    Console.WriteLine("Your key is: " + ch)

  }   

}



           

       

One Response to “Read a character from the keyboard”

  1. fobia Says:

    I have come to know that there are 2 categories of applications for iPhone: 1. Native Application 2. Web Application I like to see live examples of both of them.

    ________________
    iphone 3g

Leave a Reply