Introduction to Feature Flags
You can use a Feature Flag to turn features in your code, such as specific methods or sections in your code, on or off. This can be extremely helpful when you want to hide (disable) and expose (enable) features in a solution. Features that are not complete and ready for release yet can be hidden or exposed in the solution. This allows us to test code in production for a subset of users. You can enable the code for a subset of users, for instance, based on the login name of the user and let them test the features before releasing them to others. However, there is a drawback to Feature Flags: they introduce more complexity in your code, so it is better to constrain the number of toggles in your application.
The recommended approach when creating Feature Flags is to keep them outside the application. For instance, a web or app configuration file is a good place to add Feature Flags because you can change them easily, without the need to redeploy the application...