public enum Sea { id, age, name }
Sea s = Sea.age; Sea s1 = Sea.id; var s2 = (Sea)2;//name Console.WriteLine($"{s},{(int)s},{(int)s1},{s2}");//age,1,0,name
本文来自博客园,作者:阿霖找BUG,转载请注明原文链接:https://www.cnblogs.com/lin-07/p/17559168.html