Ad
  • Custom User Avatar

    I do not know what "Deadfish" is in general but this solution seems to go against Open/Closed principle. If you ever have to expand available commands you will need to modify the logic of your code which is not desirable. Instead, you can use interfaces along with a dictionary to be able to add new commands. If you will need to add new options you will add the to the dictionary and therefore not modify the logic.