Is there a way in .NET to make your overload of a method appear first in the Intellisense dropdown?

StackOverflow https://stackoverflow.com/questions/281269

Question

In a form, I added an overload of ShowDialog(). In Visual Studio, this overload shows up in Intellisense as the third version. How can I make my overloaded function appear as #1 (i.e. the default)?

Was it helpful?

Solution

As far as I know, there is no way to control the order of overloads in the overload selection intellisense tip.

OTHER TIPS

You should use a plugin for that: one that accomplishes the required task is the Visual Assist from Tomato - http://www.wholetomato.com/

It does exactly what you want(among the other options): display the non-inherited members on the top of the suggestion list and(or) makes them bold

Nope. But VS should highlight the most recently used option in intellisense, which is the next best thing.

Tools->Options->Text Editor->(your language)->Intellisense-> IntelliSense pre-selects most recently used member

Not unless the number of parameters is less than the current #1 in the list, I believe. Ic ould be wrong, though - I often am. :)

I am at a loss as to why you want this, though...

  1. It doesn't matter. and
  2. there are better ways to achieve what you are looking for, as answered in other questions..
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top