Mapper
public static void Mapper<T>(T tSource, T tDestination) where T : class { //获得所有property的信息 PropertyInfo[] properties = tSource.GetType().GetProperties(); foreach (PropertyInfo p in properties) { p.SetValue(tDestination, p.GetValue(tSource, null), null);//设置tDestination的属性值 } }