Cannot implicitly convert type 'string' to 'int' error

后端 未结 3 868
梦谈多话
梦谈多话 2021-01-28 05:33
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Assignment2
{
class Program
{
    static void Main(string[] args)
    {
         


        
3条回答
  •  后悔当初
    2021-01-28 05:39

    You are converting a to an int but your switch statement is matching it to strings. Change it to case 1: instead of case "1" to fix the issues.

提交回复
热议问题