Deleting code snippets
Due to human error, we can add code snippets that we don’t need, or maybe we can select the wrong code snippet. For these scenarios, VS has an option to delete code snippets. In order to see this option, navigate to Tools | Code Snippets Manager and select the CodeSnippets
folder. This folder contains the code snippet that you included in the Creating code snippets section. If you used a different name, select the correct folder for you. You can see the Remove button location in Figure 4.12:
Figure 4.12 – The Remove button in Code Snippets Manager
The Remove button will delete the whole folder, including all the code snippets inside. In VS 2022, it’s not possible to remove code snippets one by one, and therefore, we need to create a folder with a proper name for our code snippets. After removing the folder, VS will not suggest the code snippets anymore.
Important note
When you remove code snippets in VS...