02 2014 档案
摘要:1. 前端Json数组定义 var jsonArr=new Array(); var json1={"Name":"zhangsan","Age":15,"Sex":"male"}; var json2={"Name":"lisi","Age":10,"Sex":"female"}; jsonArr.push(json1); jsonArr.push(json2);2. 后端:C# 定义与传入的J
阅读全文
摘要:1 定义枚举: public enum Pepole { [Description("男孩")] boy=1, [Description("女孩")] girl=2, man=3 }2 泛型方法:获取枚举的说明信息public static Dictionary GetEnumDescription() { Dictionary dic = new Dictionary(); FieldInfo[] fields =typeof(T).GetFields(); foreach (FieldInfo field in fields) { if (f...
阅读全文