/// <summary> /// Checks whether two objects of the same type are field-wise equal. Type resolution is done /// statically, which allows fast code (similar to hand-rolled performance). /// However, warning: if the objects are of compile-time type BaseType, but at runtime turn out /// to be SubClass, then only the fields of BaseType will be checked. /// This is simply a type-inference friendly wrapper around FieldwiseEquality<>.Instance /// </summary> /// <typeparam name="T">The type of the objects to compare.</typeparam> public static bool AreEqual <T>(T a, T b) => FieldwiseEquality <T> .Instance(a, b);
/// <summary> /// Checks whether two objects of the same type are field-wise equal. Type resolution is done /// statically, which allows fast code (similar to hand-rolled performance). /// However, warning: if the objects are of compile-time type BaseType, but at runtime turn out /// to be SubClass, then only the fields of BaseType will be checked. /// /// This is simply a type-inference friendly wrapper around FieldwiseEquality<>.Instance /// </summary> /// <typeparam name="T">The type of the objects to compare.</typeparam> public static bool AreEqual <T>(T a, T b) { return(FieldwiseEquality <T> .Instance(a, b)); }