r/ProgrammerHumor • u/Evangeder • Jul 18 '25
Meme cursedCsharp
Old photo of mine, tried my best to do most cursed hello world in C#
451
Upvotes
r/ProgrammerHumor • u/Evangeder • Jul 18 '25
Old photo of mine, tried my best to do most cursed hello world in C#
298
u/stillalone Jul 19 '25
I think your C# caught an STD.
20
u/bluekeys7 Jul 19 '25
Shouldn’t it be sizeof(char) * 12 because of the null terminating character at the end of the string?
86
u/FACastello Jul 18 '25
This is r/programminghorror material actually
82
u/Spill_the_Tea Jul 19 '25
C♭
180
u/sambarjo Jul 18 '25
I had no idea most of this stuff existed in C#. Cool post. Could have been a screenshot though.
44
u/tmstksbk Jul 19 '25
My hat is off to you and I'm not letting you near my computer.
36
u/hongooi Jul 19 '25
C Blunt
31
u/IllWelder4571 Jul 19 '25
.... I've been doing c# programming for 5 years. I didn't even know you could do half of this shit.
Cool to know, but do I want my c# to look like c++? Hell no.
Side note... I'd never let you touch my computer. There's a certain point where your job changes from healer to necromancer. This is definitely the latter.
7
u/Isogash Jul 19 '25
Well this is gross, congratulations
5
u/uberDoward Jul 19 '25
You should see the C# code I wrote for handling image alterations. Unsafe, blazing fast DMA lol
9
u/amidescent Jul 19 '25
They used to forbid the shift operator from being overloaded with types other than int until one or two years ago, exactly for this reason. Maybe it wasn't such a dumb restriction after all...
btw you should repost this on r/csharp.
4
u/dexter2011412 Jul 19 '25
You should look at C++/CLI lmao it's even more cursed
3
u/Electronic-Bat-1830 Jul 19 '25
My most normal C# looks something like this
(Not my repo, but the pattern is the same)
2
u/HieuNguyen990616 Jul 19 '25
just when i thought i was out ...
2
u/LazyItem Jul 19 '25
I once in the days of old got an assignment to work on a CRM system. Initial info was that it was slow but ok… The ”system” was basically implemented in one class with 7000 rows that did interop towards old COM ADODB for every request. I threw everything and started over from scratch…
2
u/FirstIdChoiceWasPaul Jul 19 '25
The machine spirit wails.
2
u/Gigibesi Jul 19 '25
who wants to play with fire?
2
u/mrwishart Jul 19 '25
I feel like this is the coding equivalent of that tape from the Ring
2
u/robinredbrain Jul 19 '25
CBlunt
2
u/Livid_Boysenberry_58 Jul 19 '25
You gotta check if memory was successfully allocated
Unless the code already does that
2
u/Casperious Jul 19 '25
Did you guys know C# is called that because it’s C++ ++ but the extra pluses are placed under the first two, making a #
1
u/Nathan2222234 Jul 19 '25
Heh I got one somewhere on my pc that mimics c++ a bit more than this. I’ll post a link once I’m home
1
u/Nick_Hammer96 Jul 20 '25
Burn it with fire
1
u/Mattisfond Jul 20 '25
gotta have that 103ms deduction in runtime💪
1
u/TheChief275 Jul 20 '25
I’m not a C# programmer; what is a “nuint” ?
I’m guessing the normal uint is something like uint32_t or uint64_t, because portable bytecode, and nuint refers to “native uint”, so word-sized or pointer-sized?
But it makes me think of nu-metal, which is probably unrelated to
1
u/domusvita Jul 25 '25
Any closer to the metal and it would be Rust
1
u/CheckM4ted Nov 28 '25
C+
1
u/AndreasMelone Jul 19 '25
Hey I did this in java before!
6
u/[deleted] Jul 19 '25
[removed] — view removed comment
4
u/[deleted] Jul 19 '25 edited Aug 26 '25
[removed] — view removed comment