ProgrammerHumor

cursedCsharp

cursedCsharp

Old photo of mine, tried my best to do most cursed hello world in C#

https://i.redd.it/jew9forvmpdf1.jpeg
Reddit

Discussion

stillalone

I think your C# caught an STD.

9 hours ago
Evangeder OP
:cs:

r/angryupvote

2 hours ago
sambarjo
:cp: :cs:

I had no idea most of this stuff existed in C#. Cool post. Could have been a screenshot though.

12 hours ago
capinredbeard22

That’s part of the curse: you lose the Print Screen key on your keyboard!

10 hours ago
BoBoBearDev

I have no idea you can do << in c#

8 hours ago
setibeings
:rust::cp::js::ru::ts::j:

I don't know csharp, but I'm 95% sure that's a bitwise shift.

7 hours ago
ThatOneCSL

I don't know if this is a joke or not, but in the event it isn't...

Ohhhhh boy is C stream IO going to be an eye opener for you.

7 hours ago
DoNotMakeEmpty
:c::lua:

Isn't this C++ stream IO instead of C? C has (f/s)printf, which are much tamer than iostream.

4 hours ago
Temporary_Equal_1821

Many languages support operator overloading, a form of polymorphism. I've never worked with C# (thankfully), but that's how << works with output streams (e.g., cout) in C++.

6 hours ago
joske79

What is it you don't like about C#?

1 hour ago
CreepyDadd

I agree, too many C# haters. From someone who has coded in, Java, C, C++, ObjectiveC++, Swift, JS and C#. C++ and C# are tied first for my favorite languages to code in

1 hour ago
FACastello
:c::cp::cs::j::js::ts:

This is r/programminghorror material actually

11 hours ago
tmstksbk

My hat is off to you and I'm not letting you near my computer.

9 hours ago
bluekeys7

Shouldn’t it be sizeof(char) * 12 because of the null terminating character at the end of the string?

8 hours ago
hongooi
:r::cp:

C# strings aren't null terminated

7 hours ago
RamonaZero

You’re null terminated

7 hours ago
hongooi
:r::cp:

YOUR MOM™ is null terminated

7 hours ago
Etiennera

If you're allocating native memory and using this std, are they still C# strings?

4 hours ago
hongooi
:r::cp:

Hmm you may be right, this isn't a regular string but an object of class cstr

3 hours ago
Evangeder OP
:cs:

string is never native/unmanaged in c#, cstr here is just a wrapper for char pointers, don’t remember how I did the bitshift operator overload but prob some pointer logic shenanigans. I might still have the code at my pc, I can check for it at Monday.

2 hours ago
faculty_for_failure
:cs::c::ru::py::ts:

They are actually null terminated in memory. You just don’t have to deal with the null terminator from code.

26 seconds ago
faculty_for_failure
:cs::c::ru::py::ts:

They are actually null terminated in memory. You just don’t have to deal with the null terminator from code.

18 seconds ago
hongooi
:r::cp:

C Blunt

9 hours ago
Spill_the_Tea

C♭

6 hours ago
jeckles96

Fuck I just made the same joke

6 hours ago
savevidio

hold on that's C#??? I thought that was C++ WHY DID YOU DO THAT

10 hours ago
uberDoward
:cs::cp::py::ts::powershell::asm:

You should see the C# code I wrote for handling image alterations.  Unsafe, blazing fast DMA lol

9 hours ago
Isogash

Well this is gross, congratulations

9 hours ago
IllWelder4571

.... 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.

6 hours ago
amidescent

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.

6 hours ago
dexter2011412
:cp::py::rust:

You should look at C++/CLI lmao it's even more cursed

4 hours ago
7374616e74

This should be called C#++

6 hours ago
jeckles96

I think more like Cb

6 hours ago
LazyItem

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…

6 hours ago
Electronic-Bat-1830
:cs::cp::ts::powershell:

My most normal C# looks something like this

(Not my repo, but the pattern is the same)

7 hours ago
HieuNguyen990616

just when i thought i was out ...

7 hours ago
FirstIdChoiceWasPaul

The machine spirit wails.

5 hours ago
Gigibesi

who wants to play with fire?

50 minutes ago
mrwishart
:cs:

I feel like this is the coding equivalent of that tape from the Ring

8 minutes ago
SokkaHaikuBot

Sokka-Haiku by mrwishart:

I feel like this is

The coding equivalent

Of that tape from the Ring


Remember that one time Sokka accidentally used an extra syllable in that Haiku Battle in Ba Sing Se? That was a Sokka Haiku and you just made one.

7 minutes ago
mrwishart
:cs:

There is no haiku in Ba Sing Se 👀

6 minutes ago
AndreasMelone

Hey I did this in java before!

6 hours ago