Click here to Skip to main content
15,906,567 members
Home / Discussions / C#
   

C#

 
Generaldatagrid slow updating Pin
bwagz18-Nov-04 14:21
bwagz18-Nov-04 14:21 
GeneralArrayList in ArrayList Pin
stumpi18-Nov-04 13:52
stumpi18-Nov-04 13:52 
GeneralRe: ArrayList in ArrayList Pin
maibuihuynhtg18-Nov-04 16:43
maibuihuynhtg18-Nov-04 16:43 
GeneralOverriding soap interpretation of specific types Pin
WildRide18-Nov-04 13:32
WildRide18-Nov-04 13:32 
GeneralRe: Overriding soap interpretation of specific types Pin
steve_hocking19-Nov-04 3:23
steve_hocking19-Nov-04 3:23 
QuestionHow can i get the ID3 info on MP3s Pin
visiontec18-Nov-04 13:30
visiontec18-Nov-04 13:30 
AnswerRe: How can i get the ID3 info on MP3s Pin
Leon van Wyk18-Nov-04 22:07
professionalLeon van Wyk18-Nov-04 22:07 
GeneralOverriding Object.Equals; Overriding Object.GetHashCode Pin
McClamm18-Nov-04 12:07
McClamm18-Nov-04 12:07 
This is a purely theoretical question--I'm not even asking for help this time.

I've been working a bunch with some clever datastructures and I have found myself needing to provide Equals overrides so that when I use Contains a correct comparison is used to determine whether elements are inside a datastructure.

Anyway, when you override Equals, you have to override GetHashCode. Why exactly is this? Is it that the default Equals behavior involves comparison of hash numbers for the objects being compared? I always thought that the default Equals was just comparison of addresses. Maybe it's my java experience bubbling over.

On this topic, if we do not know exactly how Microsoft/.NET's default implementation of GetHashCode operates, when we write our own implementations of GetHashCode isn't it possible that we could... well... really muck things up? It just seems like we would want the same hashing behavior for ANY kind of object.

vir·tu·al re·al·i·ty
n. Abbr. VR

A computer simulation of a real or imaginary universe in which Microsoft APIs are thoroughly documented and behave in an entirely logical manner.
GeneralRe: Overriding Object.Equals; Overriding Object.GetHashCode Pin
Daniel Turini18-Nov-04 20:45
Daniel Turini18-Nov-04 20:45 
GeneralDeclaring arrays of class objects Pin
Steve Searcy18-Nov-04 9:20
Steve Searcy18-Nov-04 9:20 
GeneralRe: Declaring arrays of class objects Pin
Daniel Turini18-Nov-04 10:05
Daniel Turini18-Nov-04 10:05 
GeneralDataGrid Header in Windows Application Pin
Hamada_star18-Nov-04 6:28
Hamada_star18-Nov-04 6:28 
GeneralC# Datagrid Separate Column Header Font Colors Pin
StyleGuide18-Nov-04 5:13
StyleGuide18-Nov-04 5:13 
QuestionHow to create automatic updates ? Pin
Inquire2you18-Nov-04 4:14
Inquire2you18-Nov-04 4:14 
AnswerRe: How to create automatic updates ? Pin
Ami Bar18-Nov-04 9:19
Ami Bar18-Nov-04 9:19 
Generalcombobox.selectedvalue Pin
webhay18-Nov-04 3:16
webhay18-Nov-04 3:16 
GeneralString Contains String Pin
MrEyes18-Nov-04 3:01
MrEyes18-Nov-04 3:01 
GeneralRe: String Contains String Pin
MrEyes18-Nov-04 3:10
MrEyes18-Nov-04 3:10 
Generaleasy: string formatting Pin
bouli18-Nov-04 1:17
bouli18-Nov-04 1:17 
GeneralRe: easy: string formatting Pin
Ami Bar18-Nov-04 4:11
Ami Bar18-Nov-04 4:11 
GeneralRe: easy: string formatting Pin
bouli18-Nov-04 4:15
bouli18-Nov-04 4:15 
GeneralRe: easy: string formatting Pin
Dave Kreskowiak18-Nov-04 6:33
mveDave Kreskowiak18-Nov-04 6:33 
GeneralRe: easy: string formatting Pin
bouli18-Nov-04 9:06
bouli18-Nov-04 9:06 
GeneralRe: easy: string formatting Pin
Dave Kreskowiak18-Nov-04 9:46
mveDave Kreskowiak18-Nov-04 9:46 
GeneralRe: easy: string formatting Pin
Nick Parker18-Nov-04 11:40
protectorNick Parker18-Nov-04 11:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.