通过枚举植取得其对应的数字,或者通过数字取得其对应的值

      int m = int.Parse(Enum.Format(typeof(MaterialForms), cr.MaterialType, "d"));
      string codem = Enum.Format(typeof(MaterialFormCode), m, "g");
原文地址:https://www.cnblogs.com/swtool/p/4818653.html