Implementing a content-hashable HashSet in C# (like python's `frozenset`)
问题 Brief summary I want to build a set of sets of items in C#. The inner sets of items have a GetHashCode and Equals method defined by their contents . In mathematical notation: x = { } x.Add( { A, B, C } ) x.Add( { A, D } ) x.Add( { B, C, A } ) now x should be{ { A, B, C }, { A, D } } In python, this could be accomplished with frozenset : x = set() x.add( frozenset(['A','B','C']) ) x.add( frozenset(['A','D']) ) x.add( frozenset(['B','C','A']) ) /BriefSummary I would like to have a hashable