Labels for an ordinary goto
are required to be spelled out in the source code. They are not expressions that are evaluated; they are simply identifiers. Labels for goto case
are required to be constant expressions, evaluated at compile time, not at run time.
I would caution you against any solution that relies heavily on "goto" of any form. There is a popular prejudice against any kind of "goto"; gotos are believed to be inelegant and make your code hard to follow. There is some truth underlying this prejudice to be sure, though C# has been carefully designed so that the worst abuses of "goto" are impossible or unlikely. (C# only allows gotos within the same block or from an inner block to one of its containing blocks. It never allows a goto from an outer block into an inner block, or between two blocks that have no nesting relationship. This greatly reduces the likelihood of "spaghetti code".)
I assume since you are taking a course you are just beginning to learn C#. As you advance you'll learn about control flow techniques that are more elegant than switching on cases.
While we are criticizing your code: consider using int.TryParse
rather than Convert.ToInt32
, and make sure you handle the case where the user types in something that is not an integer.