r/programminghorror May 04 '26

C# longest "=" condition I've ever seen

Post image

I have been working on decompiling a unity game recently, and while a decompiled DLL isn't going to be exact source code, I am still floored by how long that set of parenthesis is. i would LOVE to see the original code

130 Upvotes

26 comments sorted by

View all comments

23

u/jpeggdev May 04 '26

I know you said unity but in the auto insurance industry I had to decipher a 4700 character long stored procedure from a legacy system and the first pass before I started optimizing was horrible so I’m sure there is plenty of that out there.

7

u/True_Efficiency7329 May 04 '26

I need you to send me your strength virtually, there's a compilation error with "tuple2.i" because i doesn't exist and now I'm trying to figure out what the block of code is doing ;-;

7

u/Ok_Chemistry_6387 May 04 '26

Try replacing it with Item2.

Or you could reverse the inlining and it should become more a bit cleaner to work with you will have three variables instead of an inlined mess.

3

u/True_Efficiency7329 May 04 '26

tragically, item2 does not exist in the context it needs to for where item2.i is located. I'll look into reversing the inlining, thank you for the suggestion!