Click here to Skip to main content
15,879,239 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: Two of my most frequent issues with .net inconsistencies Pin
Greg Utas24-Aug-22 11:29
professionalGreg Utas24-Aug-22 11:29 
GeneralRe: Two of my most frequent issues with .net inconsistencies Pin
PIEBALDconsult24-Aug-22 11:37
mvePIEBALDconsult24-Aug-22 11:37 
GeneralRe: Two of my most frequent issues with .net inconsistencies Pin
Greg Utas24-Aug-22 13:35
professionalGreg Utas24-Aug-22 13:35 
GeneralRe: Two of my most frequent issues with .net inconsistencies Pin
englebart1-Sep-22 6:59
professionalenglebart1-Sep-22 6:59 
GeneralRe: Two of my most frequent issues with .net inconsistencies Pin
Richard Deeming24-Aug-22 22:06
mveRichard Deeming24-Aug-22 22:06 
GeneralRe: Two of my most frequent issues with .net inconsistencies Pin
PIEBALDconsult25-Aug-22 3:21
mvePIEBALDconsult25-Aug-22 3:21 
GeneralRe: Two of my most frequent issues with .net inconsistencies Pin
Richard Deeming25-Aug-22 5:05
mveRichard Deeming25-Aug-22 5:05 
GeneralRe: Two of my most frequent issues with .net inconsistencies Pin
PIEBALDconsult25-Aug-22 7:40
mvePIEBALDconsult25-Aug-22 7:40 
Seems pointless anyway. Why would I want a "default error message"? Or, if I do, I'd make that an inner exception and provide a meaningful message in the main exception.

So far I have found no useful features of C# 6... except...
I just found that "dictionary initializer" is a C# 6 feature and I have been toying with that for a week or so now. Why didn't this exist since the advent of initializers?

I also just dabbled with string interpolation -- which I heard about, but hadn't bothered with -- and, as expected, it provides no benefit to me. It works only with string literals, and most format strings I use are not literals. It looks like it would lead to bad practices. In particular, how do you use string interpolation with globalization?


Anyway, now that I know that I am using a v6 compiler, I can see if that's why my recent builds refuse to execute on the servers. I'll specify v4 and see if they succeed then.

Edit: In case anyone is curious. Yes, once I rebuilt with an earlier compiler (v5), I was able to run the utility on the server. I am not in control of what versions of things (e.g. .net) are installed on my laptop and the servers, but it's never the latest version.

modified 27-Aug-22 13:27pm.

GeneralRe: Two of my most frequent issues with .net inconsistencies Pin
Bernhard Hiller25-Aug-22 21:09
Bernhard Hiller25-Aug-22 21:09 
GeneralRe: Two of my most frequent issues with .net inconsistencies Pin
PIEBALDconsult27-Aug-22 6:19
mvePIEBALDconsult27-Aug-22 6:19 
GeneralRe: Two of my most frequent issues with .net inconsistencies Pin
Eddy Vluggen1-Sep-22 3:44
professionalEddy Vluggen1-Sep-22 3:44 
GeneralTECO Macros - show me the codez Pin
MrChug10-Aug-22 17:39
MrChug10-Aug-22 17:39 
GeneralRe: TECO Macros - show me the codez Pin
PIEBALDconsult10-Aug-22 17:44
mvePIEBALDconsult10-Aug-22 17:44 
GeneralRe: TECO Macros - show me the codez Pin
englebart1-Sep-22 7:06
professionalenglebart1-Sep-22 7:06 
GeneralRe: TECO Macros - show me the codez Pin
PIEBALDconsult1-Sep-22 7:28
mvePIEBALDconsult1-Sep-22 7:28 
GeneralWeird: Very confusing Base64 problem (includes quiz) Pin
raddevus21-Jul-22 11:12
mvaraddevus21-Jul-22 11:12 
GeneralRe: Weird: Very confusing Base64 problem (includes quiz) Pin
Randor 21-Jul-22 21:40
professional Randor 21-Jul-22 21:40 
GeneralRe: Weird: Very confusing Base64 problem (includes quiz) Pin
raddevus22-Jul-22 2:50
mvaraddevus22-Jul-22 2:50 
GeneralRe: Weird: Very confusing Base64 problem (includes quiz) Pin
Marc Clifton4-Aug-22 4:24
mvaMarc Clifton4-Aug-22 4:24 
GeneralRe: Weird: Very confusing Base64 problem (includes quiz) Pin
RickZeeland10-Aug-22 20:47
mveRickZeeland10-Aug-22 20:47 
GeneralRe: Weird: Very confusing Base64 problem (includes quiz) Pin
Richard Deeming10-Aug-22 21:59
mveRichard Deeming10-Aug-22 21:59 
GeneralRe: Weird: Very confusing Base64 problem (includes quiz) Pin
RickZeeland10-Aug-22 22:20
mveRickZeeland10-Aug-22 22:20 
RantGetAssemblyVersion, VB style Pin
Saša Ćetković27-Jun-22 3:03
professionalSaša Ćetković27-Jun-22 3:03 
GeneralRe: GetAssemblyVersion, VB style Pin
Southmountain1-Jul-22 12:55
Southmountain1-Jul-22 12:55 
GeneralRe: GetAssemblyVersion, VB style Pin
Saša Ćetković2-Jul-22 4:07
professionalSaša Ćetković2-Jul-22 4:07 

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.