Do you use Enums instead of hard coded strings?
  v1.0 Posted at 27/04/2018 1:54 AM by Tiago Araujo

Use Enums instead of hard-coded strings, it makes your code lot cleaner and is really easy to manage.

Figure: Bad example - "Hard- coded string" works, but is a bad idea
Figure: Good example - Used Enums, looks good and is easy to manage

Related rules

    Do you feel this rule needs an update?

    If you want to be notified when this rule is updated, please enter your email address: