Compare two structs' values in C#
问题 I'm not looking for a comparison of two structs that returns bool, I am wondering if there is a way to get which fields of two structs (the same structure, but maybe different values) are different. Basically I want a simpler way to do the following: public class Diff { public String VarName; public object Val1; public object Val2; public Diff(String varName, object val1, object val2) { VarName = varName; Val1 = val1; Val2 = val2; } public override string ToString() { return VarName + "