Free Support Forum - aspose.com

Problem with Style.GetHashCode()

Laurence,

I need the ability to uniquely identify Styles so I decided to use Style.GetHashCode(). Apart from the fact that this method does not seem to take into account all of the style’s properties, it uses a StringBuilder to create a unique string. Then it calls StringBuilder.GetHashCode(), but this does not return the contained string’s hash code but the StringBuilder’s Hash Code.

Maybe this was fixed / changed in a later release - I’m still on 3.5.3.2

However I wanted to raise this issue. For now I have written my own "workaround"

Regards

Kai

Hi Kai,

Please try this attached fix.

Now Aspose.Excel is upgraded to Aspose.Cells. Please:

1. Remove the reference to Aspose.Excel and add the reference to Aspose.Cells.

2. Find all "Aspose.Excel" string in your application and replace it with "Aspose.Cells".

Laurence,

thanks for the quick fix. I appreciate it

Regards

Kai