Exemplo n.º 1
0
        public void Copy(Priority obj)
        {
            if (obj == null)
                return;

            // copy all of the properties
            foreach (PropertyInfo pi in obj.GetType().GetProperties())
            {
                // get the value of the property
                var val = pi.GetValue(obj, null);
                pi.SetValue(this, val, null);
            }
        }
Exemplo n.º 2
0
 public Priority(Priority priority)
 {
     Copy(priority);
 }
Exemplo n.º 3
0
 public void Copy(Priority priority)
 {
     // copy all of the properties
     foreach (PropertyInfo pi in priority.GetType().GetProperties())
     {
         // get the value of the property
         var val = pi.GetValue(priority, null);
         pi.SetValue(this, val, null);
     }
 }