diff --git a/ILSpy.BamlDecompiler/Ricciolo.StylesExplorer.MarkupReflection/XmlNamespace.cs b/ILSpy.BamlDecompiler/Ricciolo.StylesExplorer.MarkupReflection/XmlNamespace.cs index 5094a9f39..a0bdae9e7 100644 --- a/ILSpy.BamlDecompiler/Ricciolo.StylesExplorer.MarkupReflection/XmlNamespace.cs +++ b/ILSpy.BamlDecompiler/Ricciolo.StylesExplorer.MarkupReflection/XmlNamespace.cs @@ -27,7 +27,15 @@ namespace Ricciolo.StylesExplorer.MarkupReflection public override int GetHashCode() { - return Prefix.GetHashCode() + Namespace.GetHashCode() >> 20; + int hashCode = 0; + unchecked + { + if (Namespace != null) + hashCode += 1000000007 * Namespace.GetHashCode(); + if (Prefix != null) + hashCode += 1000000009 * Prefix.GetHashCode(); + } + return hashCode; } } } \ No newline at end of file