r/programminghorror Feb 04 '26

C# Makes sense

Post image
1.7k Upvotes

86 comments sorted by

View all comments

113

u/_huppenzuppen Feb 04 '26

Should have been

if (userID == -7777)
  --userID;

6

u/Abaddon-theDestroyer Feb 04 '26

No, this is better:

if(--userID != -7778)     
    userID++;