top of page

Console.ReadKey()

  • Admin
  • Jun 8, 2024
  • 1 min read

Generalley this command is used for terminating the session. It asks to user to input any key.


Console.WriteLine("press a button:");
ConsoleKeyInfo pbutton = Console.ReadKey();
Console.WriteLine();
Console.WriteLine("the pressed button: " + pbutton.KeyChar);
Console.WriteLine("Press any key to terminate session:");
Console.ReadKey();



Output

press a button:

a

the pressed button: a

Press any key to terminate session:

Recent Posts

See All
List the files in the folder by using TCL

Here is a simple script to list all the files in a folder with or without file extension. set folder [tk_chooseDirectory -title "Select a folder"] if {$folder eq ""} { puts "No folder selected."

 
 
 
Solutions in Nastran

Here's a concise definition table for every solution type (SOL) in NASTRAN, focusing on commonly used ones. Each entry includes the SOL number, solution type, and a brief description. SOL Number Name

 
 
 

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating

© 2023

 
bottom of page