Click here to Skip to main content
15,885,366 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
Ian Shlasko3-Dec-09 6:20
Ian Shlasko3-Dec-09 6:20 
GeneralRe: \r\n Pin
peterchen11-Dec-09 2:48
peterchen11-Dec-09 2:48 
GeneralRe: \r\n Pin
Ian Shlasko11-Dec-09 2:55
Ian Shlasko11-Dec-09 2:55 
GeneralRe: \r\n Pin
Luc Pattyn11-Dec-09 3:57
sitebuilderLuc Pattyn11-Dec-09 3:57 
GeneralRe: \r\n Pin
PIEBALDconsult3-Dec-09 5:28
mvePIEBALDconsult3-Dec-09 5:28 
GeneralRe: \r\n Pin
Luc Pattyn3-Dec-09 5:49
sitebuilderLuc Pattyn3-Dec-09 5:49 
GeneralRe: \r\n Pin
jofli4-Dec-09 1:07
jofli4-Dec-09 1:07 
GeneralRe: \r\n Pin
David Skelly3-Dec-09 6:07
David Skelly3-Dec-09 6:07 
My guess is that this is an artifact of Reflector, not of the original coder.

I do know that in VB, the Chr() function actually does use Convert.ToChar internally so my guess is that C# does the same. Who knows what Environment.NewLine does internally. I assume that the compiler has in-lined the Chr function, and Reflector has simply given you back what the compiler produced. Anyone with too much free time on their hands and a handy copy of Reflector is invited to experiment to find out what the compiler does with this sort of thing.

Reflector is showing you what the code looks like after the compiler has munged it around and played merry havoc with your beautiful code.
GeneralRe: \r\n Pin
David Skelly3-Dec-09 6:09
David Skelly3-Dec-09 6:09 
GeneralRe: \r\n Pin
harold aptroot3-Dec-09 6:22
harold aptroot3-Dec-09 6:22 
GeneralRe: \r\n Pin
David Skelly3-Dec-09 22:45
David Skelly3-Dec-09 22:45 
GeneralRe: \r\n Pin
jofli3-Dec-09 23:37
jofli3-Dec-09 23:37 
GeneralRe: \r\n Pin
David Skelly4-Dec-09 0:13
David Skelly4-Dec-09 0:13 
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 
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 

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.