Why doesn't reference loop detection use reference equality? [closed]
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 2 years ago . When serializing the object below, Json.Net detects a self-referencing loop and throws an exception. The class has two important features: it has a self-referential property, Child it overrides Equals() and GetHashCode() public class Foo { public int Value { get; set; }