Posts

Showing posts from November, 2019

Dynamic property with value

public static class PropertyCopier<TParent, TChild> where TParent : class                                             where TChild : class         {             public static void Copy(TParent parent, TChild child,int programID)             {                 //int programID = -1;                 var parentProperties = parent.GetType().GetProperties();                 var childProperties = child.GetType().GetProperties();                 foreach (var parentProperty in parentProperties)                 {                     foreach (var c...