top of page

Console.ReadKey()

Admin

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

Comparison CROD, CBAR and CBEAM

CROD, CBAR and CBEAM are one of the most popular 1d elements in Nastran. Reflecting real behaviour of structural is crucial for FEM. So,...

Reading a csv file by using tcl

Reading a csv file procedure is similar to the other programming languages. # Open the CSV file in read mode set filePath...

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating

© 2023

 
bottom of page