Showing inline parameter hints on Visual Studio 2019 like ReSharper
What are inline parameter hints?
When using a literal in a method call, some IDEs have the capability to annotate those with the name of the parameter. This makes it much easier to understand what their value represents.
Some IDEs from JetBrains have this functionality enabled by default:
- Android Studio
- IntelliJ
- PyCharm
- Storm
- ReSharper (Visual Studio plugin for .NET projects)
There are also other IDEs that support this inline hint feature like Eclipse and NetBeans.
One place where inline parameter hints become particularly useful, is when passing in null
values or booleans. What do the null
and false
arguments represent here?
The meaning of these becomes clear immediately when using inline parameter hints, without having to rely on using named arguments for readability:
This feature has now been released in the latest product update released version Visual Studio 2019 version 16.8.
To access this feature, you will need to turn this option on in Tools > Options > Text Editor > C# or Basic > Advanced and select Display inline parameter name hints (experimental).
Remember that this feature is still experimental and may have some issues to be fixed on future updates.
Reference:
Inline parameter name hints for C# and VB.NET in ReSharper and Rider
Show inline parameter hints like Resharper (Developers Community — Visual)