Native arrays and computing hashvalues (VB, C#)

Posted by Jeffrey Kern on Stack Overflow See other posts from Stack Overflow or by Jeffrey Kern
Published on 2010-06-13T01:40:37Z Indexed on 2010/06/13 1:42 UTC
Read the original article Hit count: 214

Filed under:
|
|
|

I feel bad asking this question but I am currently not able to program and test this as I'm writing this on my cell-phone and not on my dev machine :P (Easy rep points if someone answers! XD )

Anyway, I've had experience with using hashvalues from String objects. E.g., if I have StringA and StringB both equal to "foo", they'll both compute out the same hashvalue, because they're set to equal values.

Now what if I have a List, with T being a native data type. If I tried to compute the hashvalue of ListA and ListB, assuming that they'd both be the same size and contain the same information, wouldn't they have equal hashvalues as well?

© Stack Overflow or respective owner

Related posts about c#

Related posts about vb.net