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. Andrew Ng机器学习公开课笔记 -- Mixtures of Gaussians and the EM algorithm

    网易公开课,第12,13课 notes,7a, 7b,8 从这章开始,介绍无监督的算法 对于无监督,当然首先想到k means, 最典型也最简单,有需要直接看7a的讲义   Mixtures of G ...

  2. 在Delphi下基于MapWinGIS添加和删除图层标注的方法

    unit Form_MainU; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, ...

  3. Delphi 200X、XE中如何用并行实现循环的计算

    interface uses Classes, SysUtils; type TParallelProc = reference to procedure(i: Integer; ThreadID: ...

  4. Delphi如何打开DBF数据库

    Delphi语言,无论Delphi7.Delphi2007或者Delphi XE2或3,无需安装其它附加的部件,就可以实现DBF文件的打开及相关操作,网络上很多要用到什么ADO引擎的,其实未必,只有安 ...

  5. forms6 builder安装之后设置注册表开发环境

  6. DataTable .Load 方法 (IDataReader)

    DataTable .Load 方法 (IDataReader)用来从DataReader对象中填充DataTable所需的数据 public DataTable GetAllInventory() ...

  7. 【Android开发学习笔记】【第七课】五大布局-上

    概念 Android程序各式各样,依靠的就是布局,先来看看布局都是怎么来的: 白色部分就是我们经常用的几种布局,主要说说介绍下面五大布局 FrameLayout AbsoluteLayout Line ...

  8. AutoHotKey使用:空格键坏了怎么办?

    ;RCtrl:: RAlt:: Send, {space} Return http://ahkscript.org/ https://autohotkey.com/download/

  9. QGridLayout--01

    #include "mainwindow.h" #include <QApplication> #include<QLabel> #include<Q ...

  10. RepositoryItemComboBox 用法1

    RepositoryItemComboBox cbbEnd = new RepositoryItemComboBox(); cbbEnd.TextEditStyle = DevExpress.Xtra ...