首页 > Windows开发 > 详细

C# 里面swith的或者

时间:2016-03-16 18:55:57      阅读:270      评论:0      收藏:0      [点我收藏+]

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;
}
}
}
}

C# 里面swith的或者

原文:http://www.cnblogs.com/Blogs-Wang/p/5284377.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!