diff --git a/src/api/dotnet/Symbol.cs b/src/api/dotnet/Symbol.cs index afefdf3df..c0e1e3e73 100644 --- a/src/api/dotnet/Symbol.cs +++ b/src/api/dotnet/Symbol.cs @@ -102,7 +102,10 @@ namespace Microsoft.Z3 /// A hash code public override int GetHashCode() { - return (int)NativeObject; + if (IsIntSymbol()) + return ((IntSymbol)this).Int; + else + return ((StringSymbol)this).String.GetHashCode(); }