skip to Main Content

I’m working with C# in Visual Studio and I’m encountering an issue that I can’t seem to resolve. There’s a small single underline beneath one of the characters in my code, and no matter what I do, I can’t get rid of it. When I try to delete the character associated with the underline, instead of disappearing, the underline jumps forward to the previous character. It seems to follow the deletion rather than being removed. I’ve tried various ways to remove it but haven’t had any success. Could you help me figure out what’s causing this and how I can fix it?
enter image description here

2

Answers


  1. I searched a little. It’s called syntax highlighting and you can edit from

    Tools > Options > Environment > Fonts and Colors

    My Visual Studio is in default settings for font and colors window and I do not see this single underline in text editor. You can click use default settings in this window.

    Also, if you are not using default theme, it can be. Maybe you can try change your theme. To change your theme; I suggest Visual Studio Theme Pack

    Login or Signup to reply.
  2. Try disabling CodeLens temporarily to see if the underline disappears.

    Go to Tools > Options > Text Editor > All Languages > CodeLens and uncheck the "Enable CodeLens" box.

    Rarely, issues with custom fonts or rendering in the Visual Studio editor can lead to strange underlines or misplaced visual indicators.

    Try changing the font or resetting the editor settings to default: Tools > Options > Environment > Fonts and Colors. Set the font back to Consolas or another default option and check if the underline disappears.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search