Inline hints in Visual Studio
By default, JetBrains Rider displays additional type information and parameter names in text editor windows. They are called inlay hints:
Visual Studio's default configuration doesn't display any such type or parameter information. You only see what is already present in the code:
However, you can display both temporarily if you hold Alt
and F1
. If you want to see them all the time, you have to change the text editor settings: open the Tools > Options... window and navigate to Text Editor > C# > Advanced. The settings you're looking for are available in the Inline Hints group:
The information is rendered slightly differently than in JetBrains Rider, and you can't get the exact same information no matter how you tweak the settings, but the end result is pretty close:
If you're not a fan of all this additional information in your code editor, you can disable it in JetBrains Rider settings as well: open the File > Settings window and navigate to Editor > Inlay Hints:
If you only want to tweak what information is displayed, check the C# > Parameter Name Hints and C# > Type Name Hints subsections. Also, you can display the information on demand by holding the Ctrl key if you decide to hide it.
Many of differences between JetBrains Rider and Visual Studio are only due to different default settings. If you want to keep using the same editor but like something better in the other one, take a look in the settings. You might be able to achieve the desired behavior in the editor you're using as well.