Showing inline parameter hints on Visual Studio 2019 like ReSharper

Renan Costa Alencar
2 min readJan 9, 2021

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.

Example of how inline parementer hints work on your code.

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?

Lack of arguments representation in peopleService.Find() method.

The meaning of these becomes clear immediately when using inline parameter hints, without having to rely on using named arguments for readability:

Enabling inline parameter hints give some meaningful information of the parameters.

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).

Activating inline parameter hints on Visual Studio 2019

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)

--

--

Renan Costa Alencar

Doctorate Student in Computer Engineering (Computer Intelligence). Data Scientist and Machine Learning Engineer. Software Development Analyst.