摘要: 1、先定义个枚举转换类 /// <summary> /// 枚举转换 /// </summary> public class EnumerationExtension : MarkupExtension { private Type _enumType; /// <summary> /// 枚举转换 阅读全文
posted @ 2023-06-14 11:21 骑牛射雕 阅读(1059) 评论(0) 推荐(2) 编辑
摘要: public D Mapper<D, S>(S s) { D d = Activator.CreateInstance<D>(); try { var sType = s.GetType(); var dType = typeof(D); foreach (PropertyInfo sP in sT 阅读全文
posted @ 2023-06-14 11:01 骑牛射雕 阅读(23) 评论(0) 推荐(0) 编辑