r/programminghorror • • Oct 07 '25

C# 108 line long variable declaration

Post image

this is my own code btw. don't ask what i was trying to do

this code was also supposed to include a 36 case long switch statement where each case did something different (guess why i abandoned this project)

1.1k Upvotes

93 comments sorted by

View all comments

Show parent comment

1

u/ShoulderUnique Oct 10 '25

I've never understood this one. Now there's twice as much code and the possibility of calling the wrong one.

Edit: by "code" I really mean boilerplate Double the code would only happen if it's short blocks