/** * Created by Jxy on 2019/1/3 15:42 * groovy对枚举的支持 */ enum CoffeeSize{ SHORT,SMALL,BIG,MUG } def orderCoffee(size){ println "coffee is $size" switch (size){ case [CoffeeSize.SHORT,CoffeeSize.SMALL]: println "your are health conscious&quo…
using System; using System.Collections.Generic; using System.Linq; namespace myMethod { class Animal { public string typeName = ""; public Animal(string typeName) { this.typeName = typeName; } } class Person : Animal { public Person(string typeN…
实验 直接上代码,看结果 实体类 [Flags] public enum FlagsEnum { Day = , Night = } public class EntityWithEnum { public int ID { get; set; } public FlagsEnum ValidTime { get; set; } } 数据库上下文 public partial class CodeFirstModel : DbContext { public CodeFirstModel() :…