A Field Terned Visible
by in CodeSOD on 2026-01-28Today's anonymous submitter sends us some C# code. This particular block of code controls whether two different columns are visible on the screen. If the field Dist_Por equals one set of constants, we display one column, if it equals a different constant, we display the other. Seems simple enough.
My question to you is this: how many nested ternaries do you need to solve this problem?