码迷,mamicode.com
首页 > 其他好文 > 详细

枚举结构和结构类型

时间:2015-04-06 16:57:18      阅读:120      评论:0      收藏:0      [点我收藏+]

标签:

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Diagnostics;

 

namespace ConsoleApplication4

{

    class Program

    {

        enum weekday

          {

          sunday,monday,tuesday,wednesday,thursday,friday,saturday

          };//枚举类型

        struct PhoneBook

           {

            public string name;

            public uint age;

            public string phone;

            public string address;

            }//结构类型

        static void Main(string[] args)

        {

        PhoneBook p;

        p.name = "mm";

 

 

        Debug.WriteLine(p.name);//输出窗口显示

        //weekday day;

        //day = (weekday)1;

        Console.WriteLine(p.name);

        Console.ReadKey();

        }

    }

}

 

枚举结构和结构类型

标签:

原文地址:http://www.cnblogs.com/xblydy/p/4396178.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!