C-sharp generic method reports an error

1. There are two entity classes, one of which is as follows:

bool compareResult = CompareProperties(user1, user2);
Mar.19,2021

if you need to accept two different types of parameters, the CompareProperties method needs to be defined as follows:

private static bool CompareProperties<T1, T2>(T1 obj1, T2 obj2)
{
}
Menu