class Program
{
public enum TimeOfDay
{
Morining,
Afternoon,
Evening
}
static void Main(string[] args)
{
Console.WriteLine(TimeOfDay.Afternoon); }
}

Console.WriteLine(TimeOfDay.Afternoon);//Afternoon

TimeOfDay TIME = TimeOfDay.Afternoon;

Console.WriteLine(TIME.ToString()); //Afternoon

Console.WriteLine(TIME); //Afternoon

C# Enum Type的更多相关文章

  1. Effective Java 03 Enforce the singleton property with a private constructor or an enum type

    Principle When implement the singleton pattern please decorate the INSTANCE field with "static ...

  2. C#中的枚举类型(enum type)

    ylbtech 原文 C#中的枚举类型(enum type) 概念 枚举类型(enum type)是具有一组命名常量的独特的值类型.在以下示例中: enum Color { Red, Green, B ...

  3. 【转】掌握java枚举类型(enum type)

    原文网址:http://iaiai.iteye.com/blog/1843553 1   背景 在java语言中还没有引入枚举类型之前,表示枚举类型的常用模式是声明一组具有int常量.之前我们通常利用 ...

  4. Effective Java Item3:Enforce the singleton property with a private constructor or an enum type

    Item3:Enforce the singleton property with a private constructor or an enum type 采用枚举类型(ENUM)实现单例模式. ...

  5. Java之创建对象>3.Enforce the singleton property with a private constructor or an enum type

     1. 通过一个公开的字段来获取单例 // Singleton with public final field public class Elvis { public static final Elv ...

  6. Hibernate map enum type

    1. Bean @Entity @Table(name = "entities") public class Entities { public enum entityType { ...

  7. ADO编程:error C2011: 'LockTypeEnum' : 'enum' type redefinition

     C++ Code  123   // Import the ADO type library #import "C:\\Program Files\\Common Files\\syste ...

  8. “locktype”enum type 类型重定义问题的解决

    作者:朱金灿 来源:http://blog.csdn.net/clever101 使用ado来连接数据库,结果出现这样一些编译错误: 1>f:\c++pro\iocptser\debug\msa ...

  9. 【转载】#458 Errors While Converting Between enum and Underlying Type

    You can convert to an enum value from its underlying type by casting the underlying type (e.g. int) ...

随机推荐

  1. 获取真实ip的报告

    今天登录九秒社团 http://www.9miao.com/的时候忘记了用户名和密码,尝试了5次都没登录成功,网站弹出提示15分钟后才能再次登录.我纳闷它是怎么判断用户的登录次数,这时候用户还没有登录 ...

  2. CentOS_6.5安装Nginx+PHP+MySQL

    #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH # Ch ...

  3. ubuntu12.04 安装 php5.4/php5.5

    1:修改源(我使用163的源)直接修改/etc/apt/sources.list deb http://mirrors.163.com/ubuntu/ precise main universe re ...

  4. 函数式编程Map()&Reduce()

    .forEach():每个元素都调用指定函数,可传三个参数:数组元素丶元素索引丶数组本身丶 , , , , , , , ]; a.forEach(function(v,i,a){a[i]=v+;}); ...

  5. sql 语句查询练习题

    1. 查询Student表中的所有记录的Sname.Ssex和Class列. select sname,ssex,class from student 2. 查询教师所有的单位即不重复的Depart列 ...

  6. Qt窗体内控件自适应调整大小

    http://stackoverflow.com/questions/3492739/auto-expanding-layout-with-qt-designer After creating you ...

  7. mysql基本sql语句大全(提升用语篇)

    1.说明:复制表(只复制结构,源表名:a 新表名:b) (Access可用) 法一:select * into b from a where 1<>1(仅用于SQlServer) 法二:s ...

  8. C++经典编程题#4:单词翻转

    总时间限制:  1000ms  内存限制:  65536kB 描述 输入一个句子(一行),将句子中的每一个单词翻转后输出. 输入 只有一行,为一个字符串,不超过500个字符.单词之间以空格隔开. 输出 ...

  9. sqlserver中表变量和变量表之间区别

    sqlserver中表变量和变量表之间区别

  10. http://www.cnblogs.com/java-my-life/archive/2012/05/28/2516865.html

    http://www.cnblogs.com/java-my-life/archive/2012/05/28/2516865.html