using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;//引用命名空间
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("请输入要转换的值");
string str = Console.ReadLine();
int number;
bool b = int.TryParse(str,out number);
if (b)
{
Console.WriteLine(number);
}
else
{
Console.WriteLine("输入的值不符合规范");
}
Console.ReadKey();
}
}
}
04-14
1717
