I recently had cause to track a HashSet<TypeDefinition>, but this
didn't work in all cases since TypeDefinition does not override Equals
or GetHashCode (nor do TypeReference and MemberReference base types).

Two questions:

1. I used a custom IEqualityComparer comparing full type and module
names. Is this the intended use, or is there a better type test than
string comparisons?

2. I could provide implementations for IEquatable<TypeDefinition> with
appropriate overrides for inclusion to Mono.Cecil if there is
interest. It seems like some defaults should be provided for typical
use in collections.

I'm also working with a custom build of Mono.Cecil with an overridden
Instruction.ToString(), which I found useful debugging instruction
lists.

Sandro

-- 
--
mono-cecil

Reply via email to