标签:duplicate-data
-
更好的方法是从枚举中返回字符串吗?还是有一个额外的字符串变量来保存字符串值? - c#
现在我有 public enum EnumSize { Miniscule, Tiny, Small, Medium, Large, Huge, Giant } 我想返回字符串值,所以我做了一个switch语句来返回字符串值 public string getSize() { string temp = ""; switch (pSize […]
现在我有 public enum EnumSize { Miniscule, Tiny, Small, Medium, Large, Huge, Giant } 我想返回字符串值,所以我做了一个switch语句来返回字符串值 public string getSize() { string temp = ""; switch (pSize […]