2011年12月27日
摘要: 枚举类型与其所对应的含义可通过添加属性的方法进行对应,方便遍历使用 public enum TrendMode { [Description("両方")] Both, [Description("上昇")] Up, [Description("下降")] Down, } public class EnumHelper { public static IEnumerable<T> EnumToList<T>() { Type enum... 阅读全文
posted @ 2011-12-27 12:45 risan 阅读(293) 评论(0) 推荐(0) 编辑
摘要: 常用工具方法public class Utils { /// <summary> /// JSON /// </summary> /// <param name="txt"></param> /// <returns></returns> public static Dictionary<string, object> Json2Obj(string txt) { JavaScriptSerializer serializer = new JavaScriptSeria... 阅读全文
posted @ 2011-12-27 10:57 risan 阅读(212) 评论(0) 推荐(0) 编辑