Old photo of mine, tried my best to do most cursed hello world in C#
I had no idea most of this stuff existed in C#. Cool post. Could have been a screenshot though.
That’s part of the curse: you lose the Print Screen key on your keyboard!
I have no idea you can do << in c#
I don't know csharp, but I'm 95% sure that's a bitwise shift.
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.
Isn't this C++ stream IO instead of C? C has (f/s)printf, which are much tamer than iostream.
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++.
What is it you don't like about C#?
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
My hat is off to you and I'm not letting you near my computer.
Shouldn’t it be sizeof(char) * 12 because of the null terminating character at the end of the string?
C# strings aren't null terminated
You’re null terminated
YOUR MOM™ is null terminated
If you're allocating native memory and using this std, are they still C# strings?
Hmm you may be right, this isn't a regular string but an object of class cstr
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.
They are actually null terminated in memory. You just don’t have to deal with the null terminator from code.
They are actually null terminated in memory. You just don’t have to deal with the null terminator from code.
C Blunt
C♭
Fuck I just made the same joke
hold on that's C#??? I thought that was C++ WHY DID YOU DO THAT
You should see the C# code I wrote for handling image alterations. Unsafe, blazing fast DMA lol
Well this is gross, congratulations
.... 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.
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.
You should look at C++/CLI lmao it's even more cursed
This should be called C#++
I think more like Cb
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…
My most normal C# looks something like this
(Not my repo, but the pattern is the same)
just when i thought i was out ...
The machine spirit wails.
who wants to play with fire?
I feel like this is the coding equivalent of that tape from the Ring
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.
There is no haiku in Ba Sing Se 👀
Hey I did this in java before!
I think your C# caught an STD.
r/angryupvote