Click here to Skip to main content
16,006,442 members
Home / Discussions / C#
   

C#

 
Questionhelp...how to highlight buttons in c#? Pin
Missy Glory9-May-07 15:26
Missy Glory9-May-07 15:26 
AnswerRe: help...how to highlight buttons in c#? Pin
Vikram A Punathambekar9-May-07 18:01
Vikram A Punathambekar9-May-07 18:01 
AnswerRe: help...how to highlight buttons in c#? Pin
marky7779-May-07 21:00
marky7779-May-07 21:00 
AnswerRe: help...how to highlight buttons in c#? Pin
Leyu10-May-07 2:21
Leyu10-May-07 2:21 
QuestionSimple hashcode [modified] Pin
gumi_r@msn.com9-May-07 13:04
gumi_r@msn.com9-May-07 13:04 
AnswerRe: Simple hashcode Pin
Luc Pattyn9-May-07 14:20
sitebuilderLuc Pattyn9-May-07 14:20 
GeneralRe: Simple hashcode [modified] Pin
gumi_r@msn.com9-May-07 22:33
gumi_r@msn.com9-May-07 22:33 
GeneralRe: Simple hashcode Pin
Luc Pattyn9-May-07 22:48
sitebuilderLuc Pattyn9-May-07 22:48 
Hi,

Sorry, my original reply was wrong. Of course there is only one requirement:
if obj1 == obj2 ==> hash(obj1) == hash(obj2)


The inverse is not necessary (and cannot be achieved in general, since one
cannot perform lossless compression from some amount of data towards a single
32-bit int).

I think the "remarks" in MSDN on Object.GetHashCode are clear.

It states:
"For best results, the hash code must be based on the value of an instance field or property"

and
"GetHashCode must always return the same value for a given instance of the object"

Now value types that get boxed twice produce two different objects,
their Hash Code does not have to be identical.

BTW I dont consider a Vector a value type.

Hope this helps.

Smile | :)

Luc Pattyn

[My Articles]

GeneralRe: Simple hashcode [modified] Pin
gumi_r@msn.com9-May-07 23:02
gumi_r@msn.com9-May-07 23:02 
GeneralRe: Simple hashcode Pin
Luc Pattyn9-May-07 23:09
sitebuilderLuc Pattyn9-May-07 23:09 
QuestionRegular Expression for Getting file urls. Pin
Neo_Shehpar9-May-07 12:23
Neo_Shehpar9-May-07 12:23 
AnswerRe: Regular Expression for Getting file urls. Pin
Ed.Poore9-May-07 12:41
Ed.Poore9-May-07 12:41 
AnswerRe: Regular Expression for Getting file urls. Pin
zinc_z10-May-07 1:31
zinc_z10-May-07 1:31 
QuestionSharing an object in Assembly ? Pin
zinc_z9-May-07 11:59
zinc_z9-May-07 11:59 
AnswerRe: Sharing an object in Assembly ? Pin
Judah Gabriel Himango9-May-07 12:34
sponsorJudah Gabriel Himango9-May-07 12:34 
QuestionDeleting Leading White Spaces Pin
dboy2219-May-07 10:34
dboy2219-May-07 10:34 
AnswerRe: Deleting Leading White Spaces Pin
Giorgi Dalakishvili9-May-07 10:41
mentorGiorgi Dalakishvili9-May-07 10:41 
AnswerRe: Deleting Leading White Spaces Pin
Patrick Etc.9-May-07 10:44
Patrick Etc.9-May-07 10:44 
QuestionTrace messages from a service on 2003 Server not showing??!! Pin
LongRange.Shooter9-May-07 10:25
LongRange.Shooter9-May-07 10:25 
Question"Exception of type 'System.OutOfMemoryException' was thrown Pin
AAKAra9-May-07 10:14
AAKAra9-May-07 10:14 
AnswerRe: "Exception of type 'System.OutOfMemoryException' was thrown Pin
LongRange.Shooter10-May-07 10:12
LongRange.Shooter10-May-07 10:12 
QuestionSteps to developing a Proxy Server Pin
TheGecko9-May-07 9:18
TheGecko9-May-07 9:18 
AnswerRe: Steps to developing a Proxy Server Pin
Tarakeshwar Reddy9-May-07 9:30
professionalTarakeshwar Reddy9-May-07 9:30 
QuestionHow to have the DataSet available after getting disconnected from Database server? Pin
Khoramdin9-May-07 9:07
Khoramdin9-May-07 9:07 
AnswerRe: How to have the DataSet available after getting disconnected from Database server? Pin
Giorgi Dalakishvili9-May-07 9:33
mentorGiorgi Dalakishvili9-May-07 9:33 

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.