i have this vb.net code, which may not even work in vb.net itself, but it's an example someone posted. It is suppose to copy all the properties of an object without having to code each individual property.
Code:For Each [property] As PropertyInfo In o2.GetType().GetProperties() [property].SetValue(o1, [property].GetValue(o2, Nothing), Nothing) Next [property]




Reply With Quote