public static void CopyProperties<T1, T2>(T1 objA, T2 objB) where T1 : new()
{
}
The above signature for this method compiles, however I also want to add the same ‘new’ conditional for T2
Signatures ive tried but dont work:
public static void CopyProperties<T1, T2>(T1 objA, T2 objB) where T1, T2 : new()
public static void CopyProperties<T1, T2>(T1 objA, T2 objB) where T1 : new(), where T2 : new()
1 Answer