rexcardan / Evil-DICOM

A C# DICOM Library
171 stars 98 forks source link

Compilation warnings #25

Closed anders9ustafsson closed 9 years ago

anders9ustafsson commented 9 years ago

Rex,

just wanted to highlight some compilation warnings that I experience with the latest source code. regarding the new Tag class. If I am not mistaken, you may run into performance issues with collections if GetHashCode is not overridden while Equals is.

Here is the warning log:

1>C:\Users\Anders\Documents\Visual Studio 2012\Projects\Evil-DICOM\EvilDICOM.Core\EvilDICOM.Core\Element\Tag.cs(13,18,13,21): warning CS0659: 'EvilDICOM.Core.Element.Tag' overrides Object.Equals(object o) but does not override Object.GetHashCode() 1>C:\Users\Anders\Documents\Visual Studio 2012\Projects\Evil-DICOM\EvilDICOM.Core\EvilDICOM.Core\Element\Tag.cs(13,18,13,21): warning CS0661: 'EvilDICOM.Core.Element.Tag' defines operator == or operator != but does not override Object.GetHashCode()

Best regards, Anders

anders9ustafsson commented 9 years ago

I have added a fix for this issue in my pull request #26.

rexcardan commented 9 years ago

Merged.