Click here to Skip to main content
15,903,632 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: \r\n Pin
ClementsDan8-Dec-09 16:33
ClementsDan8-Dec-09 16:33 
GeneralRe: \r\n Pin
Gideon Engelberth8-Dec-09 17:49
Gideon Engelberth8-Dec-09 17:49 
Looks like temp = Chr(13) + Chr(10) gets decompiled into temp = "\r\n"; so the compiler is smart enough to actually make the string when you call Chr with a constant. Environment.NewLine shows up as a property call in Reflector, but the JIT may inline it as a literal string.

There's no way Reflector would generate what the OP is seeing unless the code really was that bad.
GeneralRe: \r\n Pin
David Skelly4-Dec-09 4:26
David Skelly4-Dec-09 4:26 
JokeRe: \r\n Pin
TobiasP31-Dec-09 1:37
TobiasP31-Dec-09 1:37 
GeneralRe: \r\n Pin
Mark Hurd13-Jan-10 15:18
Mark Hurd13-Jan-10 15:18 
GeneralDon't they know what an array is? PinPopular
Member 448708314-Nov-09 23:38
Member 448708314-Nov-09 23:38 
GeneralRe: Don't they know what an array is? Pin
Keith Barrow16-Nov-09 1:18
professionalKeith Barrow16-Nov-09 1:18 
GeneralRe: Don't they know what an array is? Pin
GibbleCH16-Nov-09 5:15
GibbleCH16-Nov-09 5:15 
GeneralRe: Don't they know what an array is? Pin
PIEBALDconsult16-Nov-09 8:24
mvePIEBALDconsult16-Nov-09 8:24 
GeneralRe: Don't they know what an array is? Pin
0x3c016-Nov-09 8:45
0x3c016-Nov-09 8:45 
GeneralRe: Don't they know what an array is? Pin
OriginalGriff16-Nov-09 9:36
mveOriginalGriff16-Nov-09 9:36 
GeneralRe: Don't they know what an array is? Pin
ragnaroknrol16-Nov-09 10:00
ragnaroknrol16-Nov-09 10:00 
GeneralRe: Don't they know what an array is? Pin
OriginalGriff16-Nov-09 22:15
mveOriginalGriff16-Nov-09 22:15 
GeneralRe: Don't they know what an array is? Pin
Nagy Vilmos22-Nov-09 22:16
professionalNagy Vilmos22-Nov-09 22:16 
GeneralRe: Don't they know what an array is? Pin
ragnaroknrol23-Nov-09 9:34
ragnaroknrol23-Nov-09 9:34 
GeneralRe: Don't they know what an array is? Pin
Richard MacCutchan23-Nov-09 13:33
mveRichard MacCutchan23-Nov-09 13:33 
GeneralRe: Don't they know what an array is? Pin
OriginalGriff23-Nov-09 21:48
mveOriginalGriff23-Nov-09 21:48 
GeneralRe: Don't they know what an array is? Pin
Baeltazor16-Dec-09 21:46
Baeltazor16-Dec-09 21:46 
GeneralRe: Don't they know what an array is? Pin
PIEBALDconsult16-Nov-09 13:17
mvePIEBALDconsult16-Nov-09 13:17 
GeneralRe: Don't they know what an array is? Pin
akash dhar16-Nov-09 23:55
akash dhar16-Nov-09 23:55 
GeneralRe: Don't they know what an array is? Pin
Brian C Hart17-Nov-09 4:21
professionalBrian C Hart17-Nov-09 4:21 
GeneralRe: Don't they know what an array is? Pin
Member 35753717-Nov-09 12:10
Member 35753717-Nov-09 12:10 
GeneralRe: Don't they know what an array is? Pin
Wes Jones23-Nov-09 5:14
Wes Jones23-Nov-09 5:14 
QuestionRe: Don't they know what an array is? Pin
harold aptroot17-Nov-09 23:17
harold aptroot17-Nov-09 23:17 
AnswerRe: Don't they know what an array is? Pin
Member 448708322-Nov-09 0:09
Member 448708322-Nov-09 0:09 

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.