C#代码中出现的小问题,小白求指教

        #region 计算最大值
        Console.WriteLine("请输入两个字符:");
        int n1 = Convert.ToInt16 (Console.ReadLine());
        int n2 = Convert.ToInt16(Console.ReadLine());      
        int max = GetMaxNumbera(n1, n2);
        Console.WriteLine("最大值是:{0}", max);
        Console.ReadKey();
        #endregion
                    private static int GetMaxNumbera(int n1, int n2)
    {
        return (n1 > n2) ? n1 : n2;
    }
            出错:
            ![图片说明](https://img-ask.csdn.net/upload/201707/17/1500254749_341589.png)

你输入的不是数字吧。。不是数字Convert.ToInt16肯定转换错了。。


            Console.WriteLine("请输入两个字符:");
            int n1 =0;
            int.TryParse(Console.ReadLine(), out n1);//用TryParse,输入转换不了的数字也不会提示错误,n2同理
            int n2 = 0;
            int.TryParse(Console.ReadLine(), out n2);
            int max = GetMaxNumbera(n1, n2);
            Console.WriteLine("最大值是:{0}", max);
            Console.ReadKey();