Click here to Skip to main content
13,446,115 members (36,163 online)
Click here to Skip to main content

Tagged as


Posted 14 Oct 2011

Using GetHashCode correctly

, 16 Oct 2011
For reference types, the hash is based on an internal counter that is incremented every time a descendant of System.Object is created. This happens in System.Object's constructor.For value types (structs), the hash is based on the first field. So if the first field is immutable, then you don't...



Compare Revision Minor Date Status Editor
4 - publicly available No 16-Oct-11 15:24 Available Deeksha Shenoy
3 No 14-Oct-11 4:38 Available Smitha Nishant
2 No 13-Oct-11 22:47 Composing Panos Rontogiannis
1 No 13-Oct-11 22:43 Composing Panos Rontogiannis


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Panos Rontogiannis
Software Developer
Greece Greece
No Biography provided

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03-2016 | 2.8.180314.2 | Last Updated 16 Oct 2011
Article Copyright 2011 by Panos Rontogiannis
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid