Overriding GetHashCode in VB without checked/unchecked keyword support?

前端 未结 7 1808
庸人自扰
庸人自扰 2020-12-05 05:00

So I\'m trying to figure out how to correctly override GetHashCode() in VB for a large number of custom objects. A bit of searching leads me to this wonderful

相关标签:
7条回答
  • 2020-12-05 05:31

    You can implement a suitable hash code helper in a separate assembly either using C# and the unchecked keyword or turning overflow checking of for the entire project (possible in both VB.NET and C# projects). If you want to you can then use ilmerge to merge this assembly to your main assembly.

    0 讨论(0)
提交回复
热议问题