namespace BITKit { public static class BITMapper { public static void Map(T source, T target) where T : class { foreach (var info in typeof(T).GetProperties()) { info.SetValue(source, info.GetValue(target)); } foreach (var info in typeof(T).GetFields()) { info.SetValue(source, info.GetValue(target)); } } } }