Click here to Skip to main content
15,895,799 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: Trick for young players. Pin
_Maxxx_2-Nov-12 0:07
professional_Maxxx_2-Nov-12 0:07 
GeneralRe: Trick for young players. Pin
BobJanova2-Nov-12 0:50
BobJanova2-Nov-12 0:50 
GeneralRe: Trick for young players. Pin
harold aptroot2-Nov-12 0:25
harold aptroot2-Nov-12 0:25 
GeneralRe: Trick for young players. Pin
englebart2-Nov-12 2:54
professionalenglebart2-Nov-12 2:54 
GeneralRe: Trick for young players. Pin
_Maxxx_4-Nov-12 11:49
professional_Maxxx_4-Nov-12 11:49 
GeneralRe: Trick for young players. Pin
CafedeJamaica2-Nov-12 10:54
professionalCafedeJamaica2-Nov-12 10:54 
GeneralRe: Trick for young players. Pin
AspDotNetDev2-Nov-12 11:28
protectorAspDotNetDev2-Nov-12 11:28 
GeneralRe: Trick for young players. Pin
BotReject4-Nov-12 10:54
BotReject4-Nov-12 10:54 
The problem is that the Contains() method implements the equality method defined in the object type contained in the collection. As object only has an equals that tests whether or not two value types have the same value (or two reference types point to the same object), which arg1 and arg2 do, the equality test returns true. That is it considers arg1 and arg2 to be identical. The Contains() method should be used for collection objects that implement the IEquatable<t> interface Equals method. This way we can ensure that the correct behaviour for an equality test results. We could, for example, wrap the booleans in objects of a class that does this. That's what I think, but I only program for a hobby so I could be talking rubbish.
anonymous Bot

GeneralRe: Trick for young players. Pin
TheCoolCoder5-Nov-12 1:13
TheCoolCoder5-Nov-12 1:13 
GeneralRe: Trick for young players. Pin
_Maxxx_5-Nov-12 1:40
professional_Maxxx_5-Nov-12 1:40 
GeneralRe: Trick for young players. Pin
Super Lloyd5-Nov-12 17:47
Super Lloyd5-Nov-12 17:47 
GeneralRe: Trick for young players. Pin
_Maxxx_5-Nov-12 22:25
professional_Maxxx_5-Nov-12 22:25 
GeneralSomebody getting paid by the character typed? PinPopular
esaulsberry29-Oct-12 10:17
esaulsberry29-Oct-12 10:17 
GeneralRe: Somebody getting paid by the character typed? Pin
Br.Bill3-Jan-13 12:36
Br.Bill3-Jan-13 12:36 
GeneralThe occasional flash of brilliance Pin
Eddy Vluggen29-Oct-12 9:50
professionalEddy Vluggen29-Oct-12 9:50 
GeneralRe: The occasional flash of brilliance PinPopular
enhzflep29-Oct-12 15:49
enhzflep29-Oct-12 15:49 
GeneralRe: The occasional flash of brilliance PinPopular
CDP180229-Oct-12 19:51
CDP180229-Oct-12 19:51 
GeneralRe: The occasional flash of brilliance Pin
enhzflep29-Oct-12 20:04
enhzflep29-Oct-12 20:04 
GeneralRe: The occasional flash of brilliance PinPopular
CDP180230-Oct-12 1:21
CDP180230-Oct-12 1:21 
GeneralRe: The occasional flash of brilliance Pin
enhzflep30-Oct-12 6:47
enhzflep30-Oct-12 6:47 
GeneralRe: The occasional flash of brilliance Pin
Florin Jurcovici1-Nov-12 0:50
Florin Jurcovici1-Nov-12 0:50 
GeneralRe: The occasional flash of brilliance Pin
Reelix1-Nov-12 1:27
Reelix1-Nov-12 1:27 
GeneralRe: The occasional flash of brilliance Pin
KP Lee1-Nov-12 8:28
KP Lee1-Nov-12 8:28 
GeneralRe: The occasional flash of brilliance Pin
BlackMilan29-Oct-12 22:34
BlackMilan29-Oct-12 22:34 
GeneralRe: The occasional flash of brilliance Pin
Dan Neely1-Nov-12 2:41
Dan Neely1-Nov-12 2:41 

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.