I am using Visual Studio 2019 and have some warnings in my code. For instance:
I could apply one at a time but I would like to use the recommended quick action for all of them.
How can I do that?
A code fix is available for this rule in Visual Studio. To use it, position the cursor on the string literal and press Ctrl+. (period)
. Choose Use nameof to express symbol names from the list of options that's presented.
The thing to note is use the Fix all occurrences in whatever option you want.