Another handy tool that I like to use is the Quick Action tool. Appearing as a screwdriver , a lightbulb , or an error light bulb on a line of code, quick actions enable you to use a single command that will generate code, refactor code, suppress warnings, perform code fixes, and add using statements.
Since the CH10_AddressingCrossCuttingConcerns project had 32 warnings and 13 messages, we can use this project to see the quick actions in action. Have a look at the following screenshot:
Looking at the preceding screenshot, we see the lightbulb on line 10. If we click on the lightbulb, the following menu pops up:
If we click on Add readonly modifier, the readonly access modifier is placed after the private access modifier. Have a go yourself at using quick actions to modify the code. It is fairly straightforward once you get the hang of it. Once you have had a play around with...