Study notes (20): C # rapid entry - reads user input and using the Convert class for type conversion

Learning immediately: https://edu.csdn.net/course/play/20589/257729?utm_source=blogtoedu

1. Console.ReadLine (); // read a line of text entered by the user, it returns a string

2. Convert.ToXX (str); str converted to type XX

double _num2 = Convert.ToDouble(num2);    //将字符串转换为double类型

 

Published 34 original articles · won praise 0 · Views 319

Guess you like

Origin blog.csdn.net/u013162262/article/details/104743602