Click here to Skip to main content
15,850,265 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: How to determine if button should be shown? Pin
Nagy Vilmos23-Jul-09 8:33
professionalNagy Vilmos23-Jul-09 8:33 
GeneralRe: How to determine if button should be shown? Pin
Luc Pattyn23-Jul-09 9:50
sitebuilderLuc Pattyn23-Jul-09 9:50 
GeneralRe: How to determine if button should be shown? Pin
Jarek Kruza26-Jul-09 10:39
Jarek Kruza26-Jul-09 10:39 
JokeRe: How to determine if button should be shown? PinPopular
Chris Maunder26-Jul-09 4:17
cofounderChris Maunder26-Jul-09 4:17 
GeneralRe: How to determine if button should be shown? Pin
Jarek Kruza26-Jul-09 10:37
Jarek Kruza26-Jul-09 10:37 
GeneralRe: How to determine if button should be shown? Pin
BillW3314-Aug-09 3:57
professionalBillW3314-Aug-09 3:57 
GeneralRe: How to determine if button should be shown? Pin
Paul Conrad26-Jul-09 12:04
professionalPaul Conrad26-Jul-09 12:04 
GeneralRe: How to determine if button should be shown? Pin
supercat928-Jul-09 7:21
supercat928-Jul-09 7:21 
GeneralRe: How to determine if button should be shown? Pin
SteveTheThread2-Aug-09 23:34
SteveTheThread2-Aug-09 23:34 
GeneralRe: How to determine if button should be shown? Pin
Tristan Rhodes3-Aug-09 1:56
Tristan Rhodes3-Aug-09 1:56 
GeneralRe: How to determine if button should be shown? Pin
supercat93-Aug-09 6:14
supercat93-Aug-09 6:14 
GeneralRe: How to determine if button should be shown? Pin
Tristan Rhodes3-Aug-09 1:57
Tristan Rhodes3-Aug-09 1:57 
General!(How to best use a try catch block) [modified] Pin
singh.iz.king8-Jul-09 18:17
singh.iz.king8-Jul-09 18:17 
GeneralRe: !(How to best use a try catch block) Pin
killabyte9-Jul-09 1:38
killabyte9-Jul-09 1:38 
GeneralRe: !(How to best use a try catch block) Pin
josda10009-Jul-09 4:31
josda10009-Jul-09 4:31 
GeneralRe: !(How to best use a try catch block) Pin
Dan Neely9-Jul-09 4:43
Dan Neely9-Jul-09 4:43 
GeneralRe: !(How to best use a try catch block) Pin
molesworth9-Jul-09 4:39
molesworth9-Jul-09 4:39 
GeneralRe: !(How to best use a try catch block) Pin
Andrew Rissing9-Jul-09 4:51
Andrew Rissing9-Jul-09 4:51 
GeneralRe: !(How to best use a try catch block) Pin
molesworth9-Jul-09 6:42
molesworth9-Jul-09 6:42 
GeneralRe: !(How to best use a try catch block) Pin
singh.iz.king9-Jul-09 13:58
singh.iz.king9-Jul-09 13:58 
GeneralRe: !(How to best use a try catch block) Pin
0x3c09-Jul-09 6:42
0x3c09-Jul-09 6:42 
GeneralRe: !(How to best use a try catch block) Pin
supercat99-Jul-09 11:40
supercat99-Jul-09 11:40 
GeneralRe: !(How to best use a try catch block) Pin
harold aptroot9-Jul-09 12:01
harold aptroot9-Jul-09 12:01 
GeneralRe: !(How to best use a try catch block) Pin
supercat910-Jul-09 7:09
supercat910-Jul-09 7:09 
You'd just have to test the length/count of that thing, whatever it is..

And you have to test all four items to ensure they're not null, and you'd have to somehow know in advance whether any attempt to read .Value might throw an exception of its own (I know properties aren't supposed to throw exceptions, but that doesn't mean they never will).
GeneralRe: !(How to best use a try catch block) Pin
harold aptroot10-Jul-09 7:24
harold aptroot10-Jul-09 7: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.