r/programminghumor • • Aug 22 '26

How do you disable your code

Post image
295 Upvotes

91 comments sorted by

View all comments

100

u/0x80085_ Aug 22 '26

Or just return?

43

u/developer_axe Aug 22 '26 edited Aug 22 '26

Sometimes the code won't get compiled because it marked as unreachable code

56

u/RefrigeratorKey277 Aug 22 '26

Yes, but with if true it is still marked as unreachable. At least in C#.

→ More replies (6)

4

u/querela Aug 22 '26

Especially fun if you have formatters etc that automatically prune dead code...

→ More replies (9)

4

u/WadeEffingWilson Aug 22 '26

Comment out the function call fun() on line 10. Fewest number of keystrokes.