C# how to calculate hashcode from an object reference

前端 未结 3 818
[愿得一人]
[愿得一人] 2021-02-18 23:50

Folks, here\'s a thorny problem for you!

A part of the TickZoom system must collect instances of every type of object into a Dictionary<> type.

It is imperati

3条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-19 00:18

    RuntimeHelpers.GetHashCode() does exactly what is needed here.

提交回复
热议问题