Skip to content

Instantly share code, notes, and snippets.

@Tesla9527
Last active September 16, 2015 01:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tesla9527/375489a3ad297dcad912 to your computer and use it in GitHub Desktop.
Save Tesla9527/375489a3ad297dcad912 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
/// <summary>
/// 定义枚举类型性别,只有两个值Male和Female
/// </summary>
enum Gender
{
Male,
Female
}
class Program
{
//定义常量PI
const double PI = 3.14;
static void Main(string[] args)
{
Gender sex;
sex = Gender.Male;
switch (sex)
{
case Gender.Male:
Console.Write("是个男的");
break;
case Gender.Female:
Console.Write("是个女的");
break;
}
Console.ReadKey();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment