Read input from console : Console Read : Development C# Examples


C# Examples » Development » Console Read »

 

Read input from console









    
using  System;    
    
class  MainClass  {    
    public  static  void  Main()  {    
        string  str;  
  
        Console.WriteLine("Enter  password:  ");  
        str  =  Console.ReadLine();  

        Console.WriteLine(str);  
    }  
}
    
   
  
   



Output

Enter password:
asdf
asdf


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Development
» Console Read