1. There are two entity classes, one of which is as follows:
bool compareResult = CompareProperties(user1, user2);
1. There are two entity classes, one of which is as follows:
bool compareResult = CompareProperties(user1, user2);
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)
{
}
Previous: The problem of building vue by webpack
Next: How does Mini Program make the js file of a custom component receive the parameters of the parent?