结构体和枚举

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

namespace ConsoleApplication3
{
class Program
{
struct human
{
public int age;
public bool isman;
public double height;
public double weight;
public string name;
}

enum week
{
星期一,
星期二,
星期三,
星期四,
星期五,
星期六,
星期日
}
static void Main(string[] args)
{
human ck;
ck.age = 30;
ck.isman = true;
ck.height = 180.2;
ck.weight = 80.1;
ck.name = "崔凯";

Console.WriteLine(ck.GetType());

Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine(week.星期一);

Console.ReadLine();

}
}
}

posted @ 2017-06-12 16:47  小伙子很浪  阅读(108)  评论(0编辑  收藏  举报