top of page

C# Console.Read()

  • Admin
  • Jun 8, 2024
  • 1 min read

This code only allows you input one character.


Console.WriteLine("Input a character:");
int ch = Console.Read();
Console.Write("Character in  ASCII code: {0}", ch);

For example when you type A

the output will be 65 in ASCII code.


Recent Posts

See All
Spring elements in NASTRAN

In structural analysis, spring elements play a key role in simulating flexible connections, supports, joints, and contact interactions....

 
 
 

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating

© 2023

 
bottom of page