C#关于异常的问题,望大虾指教

    public void ShowMune()
    {
        Console.WriteLine("------------------------欢迎使用-----------------------------");
        Console.WriteLine("1.开户\t2.存款\t3.取款\t4.转账\t5.查询余额\t6.退出系统");
        Console.WriteLine("-------------------------------------------------------------");
        Console.WriteLine("请选择操作:");
        try
        {
            int d = int.Parse(Console.ReadLine());

            switch (d)
            {
                case 1:
                    cord();
                    break;
                case 2:
                    break;
                case 3:
                    break;
                case 4:
                    break;
                case 5:
                    break;
                case 6:
                    break;
                default:
                    break;
            }

        }
        catch(FormatException)
        {
           Console.WriteLine("输入有误!请重新输入");

        }
                    我想用多重catch在扑捉一个异常,就是int d = int.Parse(Console.ReadLine());这里我只能输入1-6,其余的数字都不允许输入,如果一旦发现有别的数字输入,就能即使扑捉到这个异常,我找了一下参数,貌似没有特定的参数来捕捉,是不是要在自定义异常才能解决,小可菜鸟一个,望大神指教!
 就你这个程序,没必要使用异常,switch判断下就可以。int.Parse在无法解析的时候只会丢出FormatException,不会根据具体为什么没法转换丢出不同的异常。
你非要做,就得自己定义不同的异常,并且自己判断输入的字符串怎么不对,并且丢出不同的异常,再自己捕获。完全没必要。这里给你一个简单的例子:

class No1to6Ex :Exception
{
}

void main()
{
try
{
int d = int.Parse(Console.ReadLine());
if (d < 1 || d > 6) throw new No1to6Ex();
}
catch (FormatException)
{
Console.WriteLine("不是数字");
}
catch (No1to6Ex)
{
Console.WriteLine("不在范围);
}
}