枚举定义:
public enum OutLineType { ac ,dc, tc };
想用switch来选择:
结果报错了,如下:switch (OutLineType) { case OutLineType.ac: { AttributeCfgList = fcs.Gig(catId);} break; case OutLineType.dc: break; case OutLineType.tc: break; default: break; }
Error 1 'For.Utility.Confiility.OutLineType' is a 'type' but is used like a 'variable'
犯了低级错误 OutLineType 是个枚举类型 ,应该用对象做switch 嘿嘿。