79735533

Date: 2025-08-14 14:25:42
Score: 0.5
Natty:
Report link

Using control names in a switch statement works but if a control name(s) should ever be changed in the life of your app the switch statement silently breaks.

This is one solution...

if (sender == rdoA) {

} else if (sender == rdoB) {

} else if (sender == rdoC) {

} else if (sender == rdoD) {

}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Erik Schroder