Click here to Skip to main content
15,890,995 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: Don't tell me how to declare a string! Pin
Vasudevan Deepak Kumar6-Aug-07 5:10
Vasudevan Deepak Kumar6-Aug-07 5:10 
GeneralRe: Don't tell me how to declare a string! Pin
Chris Losinger6-Aug-07 15:31
professionalChris Losinger6-Aug-07 15:31 
GeneralRe: Don't tell me how to declare a string! Pin
LFirth21-Aug-07 5:22
LFirth21-Aug-07 5:22 
GeneralRe: Don't tell me how to declare a string! Pin
KarstenK6-Aug-07 20:25
mveKarstenK6-Aug-07 20:25 
GeneralRe: Don't tell me how to declare a string! Pin
Adam Maras9-Aug-07 5:47
Adam Maras9-Aug-07 5:47 
GeneralHave I gone completely mad? [modified] Pin
Robert Royall31-Jul-07 10:05
Robert Royall31-Jul-07 10:05 
GeneralRe: Have I gone completely mad? Pin
PIEBALDconsult31-Jul-07 10:30
mvePIEBALDconsult31-Jul-07 10:30 
GeneralRe: Have I gone completely mad? Pin
Robert Royall31-Jul-07 13:28
Robert Royall31-Jul-07 13:28 
Well, when I was learning C++, ^ meant to the power of, /* */ meant some sort of comment, and -> meant accessing something through a pointer. From that stance, the method signature above contains an Object and an EventArgs to the power of... something, as well as two parameters that are essentially comments. Also, the first executable line tells me that you're going through the this pointer to hit the treeView1 pointer, which hits the Nodes pointer, which dereferences to the Text property, which somehow is also a pointer and must be dereferenced to hit the Equals method. Am I missing something or shouldn't there be a dot or two in there somewhere?

As for the index, I need to know where my selected node is so I can insert nodes before and after it. TreeNodeCollection does give me an AddAt method that takes an integer index parameter... but the collection doesn't give me any way to access a node's index.
GeneralRe: Have I gone completely mad? Pin
Andy Brummer31-Jul-07 18:57
sitebuilderAndy Brummer31-Jul-07 18:57 
GeneralRe: Have I gone completely mad? Pin
Haroon Sarwar31-Jul-07 22:12
Haroon Sarwar31-Jul-07 22:12 
GeneralRe: Have I gone completely mad? Pin
BadKarma31-Jul-07 22:29
BadKarma31-Jul-07 22:29 
GeneralRe: Have I gone completely mad? Pin
Brady Kelly31-Jul-07 23:46
Brady Kelly31-Jul-07 23:46 
GeneralRe: Have I gone completely mad? Pin
BadKarma31-Jul-07 23:53
BadKarma31-Jul-07 23:53 
GeneralRe: Have I gone completely mad? Pin
Robert Royall1-Aug-07 4:56
Robert Royall1-Aug-07 4:56 
GeneralRe: Have I gone completely mad? Pin
Andy Brummer31-Jul-07 19:00
sitebuilderAndy Brummer31-Jul-07 19:00 
GeneralRe: Have I gone completely mad? Pin
Robert Royall1-Aug-07 5:00
Robert Royall1-Aug-07 5:00 
GeneralRe: Have I gone completely mad? Pin
Andy Brummer1-Aug-07 5:10
sitebuilderAndy Brummer1-Aug-07 5:10 
GeneralRe: Have I gone completely mad? Pin
Robert Royall1-Aug-07 5:26
Robert Royall1-Aug-07 5:26 
GeneralRe: Have I gone completely mad? Pin
Andy Brummer1-Aug-07 5:31
sitebuilderAndy Brummer1-Aug-07 5:31 
JokeRe: Have I gone completely mad? Pin
Robert Royall1-Aug-07 5:38
Robert Royall1-Aug-07 5:38 
GeneralRe: Have I gone completely mad? Pin
Rob Achmann24-Aug-07 3:34
Rob Achmann24-Aug-07 3:34 
GeneralRe: Have I gone completely mad? Pin
Robert Royall24-Aug-07 12:25
Robert Royall24-Aug-07 12:25 
GeneralSoftware Pin
egionare31-Jul-07 6:54
egionare31-Jul-07 6:54 
GeneralRe: Software Pin
Justin Perez31-Jul-07 7:02
Justin Perez31-Jul-07 7:02 
GeneralRe: Software Pin
Paul Conrad31-Jul-07 14:04
professionalPaul Conrad31-Jul-07 14:04 

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.