📜  C# 将字符串转换为 int - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:14.884000             🧑  作者: Mango

代码示例6
// Ask user for fave number
      Console.Write("Enter your favorite number!: ");
      
      // Turn that answer into an int
      int faveNumber = Convert.ToInt32(Console.ReadLine());