C#------Accepting Values from User

The Console class in the System namespace provides a function ReadLine() for accepting input from the user and store it into a variable.

For example,

int num;
num = Convert.ToInt32(Console.ReadLine());

The function Convert.ToInt32() converts the data entered by the user to int data type, because Console.ReadLine() accepts the data in string format.

C#------Accepting Values from User

上一篇:Windows系统Git Bash Sock5代理


下一篇:Node.js安装详细步骤教程(Windows版)