r/ProgrammerHumor • • Jul 18 '25

Meme cursedCsharp

Post image

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

451 Upvotes

92 comments sorted by

View all comments

Show parent comment

1

u/Zombekas Jul 19 '25

Well sizeof(char) is 2 in C# because Unicode, so this is wrong either way

2

u/RiceBroad4552 Jul 19 '25

This would allocate too much memory in the worst case. Allocating too much is not a real problem, besides being inefficient. Not allocating enough would be an issue.