C# 里面swith的或者

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace testSwith
{
enum Operat
{
Add = 0,
Mod = 1,
Del = 2
}
class Program
{
//有意思的swith
static void Main(string[] args)
{

Operat test1=Operat.Mod;
switch (test1)
{
case Operat.Add:
{
Console.WriteLine("this is Add");
Console.ReadLine();
}
break;
case Operat.Mod:
case Operat.Del:
{
Console.WriteLine("this is Mod and Del");
Console.ReadLine();
}
break;
}
}
}
}

原文地址:https://www.cnblogs.com/Blogs-Wang/p/5284377.html