Click here to Skip to main content
15,867,308 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: The first time, and the first time 2. Pin
PIEBALDconsult8-Aug-14 9:29
mvePIEBALDconsult8-Aug-14 9:29 
GeneralRe: The first time, and the first time 2. Pin
  Forogar  7-Aug-14 4:00
professional  Forogar  7-Aug-14 4:00 
JokeRe: The first time, and the first time 2. Pin
Paul M Watt7-Aug-14 6:04
mentorPaul M Watt7-Aug-14 6:04 
GeneralRe: The first time, and the first time 2. Pin
Sander Rossel7-Aug-14 7:39
professionalSander Rossel7-Aug-14 7:39 
GeneralSetProperty!!! Pin
Super Lloyd5-Aug-14 21:03
Super Lloyd5-Aug-14 21:03 
GeneralRe: SetProperty!!! Pin
Bernhard Hiller5-Aug-14 21:13
Bernhard Hiller5-Aug-14 21:13 
GeneralRe: SetProperty!!! Pin
Duncan Edwards Jones5-Aug-14 22:02
professionalDuncan Edwards Jones5-Aug-14 22:02 
GeneralRe: SetProperty!!! Pin
Richard Deeming6-Aug-14 1:59
mveRichard Deeming6-Aug-14 1:59 
I guess that's where the second overload comes in:
C#
codeReview.SetProperty(review => review.Status, Status.WhatTheElephant);


It's not fast, pretty, or even remotely sensible, but at least it's strongly typed and the property name is checked by the compiler.



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: SetProperty!!! Pin
Duncan Edwards Jones6-Aug-14 3:25
professionalDuncan Edwards Jones6-Aug-14 3:25 
AnswerRe: SetProperty!!! Pin
Super Lloyd6-Aug-14 12:53
Super Lloyd6-Aug-14 12:53 
GeneralRe: SetProperty!!! Pin
Nicolas Dorier11-Aug-14 5:03
professionalNicolas Dorier11-Aug-14 5:03 
GeneralRe: SetProperty!!! Pin
PIEBALDconsult6-Aug-14 4:53
mvePIEBALDconsult6-Aug-14 4:53 
GeneralRe: SetProperty!!! Pin
Super Lloyd6-Aug-14 12:54
Super Lloyd6-Aug-14 12:54 
GeneralRe: SetProperty!!! Pin
Brisingr Aerowing6-Aug-14 12:37
professionalBrisingr Aerowing6-Aug-14 12:37 
GeneralRe: SetProperty!!! Pin
Nicolas Dorier11-Aug-14 5:07
professionalNicolas Dorier11-Aug-14 5:07 
GeneralRe: SetProperty!!! Pin
Super Lloyd11-Aug-14 14:25
Super Lloyd11-Aug-14 14:25 
GeneralRe: SetProperty!!! Pin
Nicolas Dorier12-Aug-14 1:13
professionalNicolas Dorier12-Aug-14 1:13 
GeneralRe: SetProperty!!! Pin
Tom Clement25-Aug-14 8:12
professionalTom Clement25-Aug-14 8:12 
GeneralResistant to Change Pin
ColborneGreg31-Jul-14 13:28
ColborneGreg31-Jul-14 13:28 
GeneralRe: Resistant to Change Pin
PIEBALDconsult31-Jul-14 13:43
mvePIEBALDconsult31-Jul-14 13:43 
GeneralRe: Resistant to Change Pin
ColborneGreg31-Jul-14 14:33
ColborneGreg31-Jul-14 14:33 
GeneralRe: Resistant to Change Pin
OriginalGriff31-Jul-14 22:11
mveOriginalGriff31-Jul-14 22:11 
GeneralRe: Resistant to Change Pin
ColborneGreg1-Aug-14 6:57
ColborneGreg1-Aug-14 6:57 
GeneralRe: Resistant to Change Pin
OriginalGriff1-Aug-14 8:20
mveOriginalGriff1-Aug-14 8:20 
GeneralRe: Resistant to Change Pin
ColborneGreg1-Aug-14 8:24
ColborneGreg1-Aug-14 8:24 

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.