Creating a hashcode for use in a database (ie not using GetHashCode)

前端 未结 3 1163
迷失自我
迷失自我 2021-01-22 01:28

I have recently been instructed in the ways of GetHashCode() and in particular \"Consumers of GetHashCode cannot rely upon it being stable over time or across appdomains\" (From

3条回答
  •  被撕碎了的回忆
    2021-01-22 02:17

    As SLaks pointed out in a comment, looking up data is what databases are good at.

    If you need fast lookups, create an index on the column. At the very least, you won't have to deal with collisions anymore.

提交回复
热议问题