static void Main()
{
var ageText = "25";
if (int.TryParse(ageText,out int age))
{
Console.WriteLine("Hi,My age is {0}",age);
}
else
{
Console.WriteLine("age {0} is not valid",ageText);
}
Console.ReadKey();
}
posted on
2018-04-12 10:43不会非的猪
阅读(138)
评论(0)
编辑收藏举报