views:

284

answers:

4

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

+2  A: 

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

configurator
A: 

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..
ZombieSheep
I voted you up for the obligatory "I don't know why you would want to do this" sniff.
MusiGenesis
According to the question, I'm looking for "a way in .NET to make your overload of a method appear first in the Intellisense dropdown". What do you think I'm looking for?
MusiGenesis
And I answered the question to the best of my knowledge. I'm just saying that I believe there are better ways to accomplish what you are looking for, given the other related questions you have asked. You are of course free to ignore all the advice given but I would reconsider if it was me.
ZombieSheep
I agree with your #1, at least.
MusiGenesis
+1  A: 

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

Will
+4  A: 

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

andy.gurin
I'll try it. I have a somewhat-irrational bias against IDE add-ins. I tend to get used to their presence and then flip out when I have to sit at someone else's machine.
MusiGenesis
I understand. Well, for me this one is a MUST since it's a unique tool I found that supports some refactoring for the C++ and has a much powerful intellisense support then the VS natives...
andy.gurin
My main idea here was a solution that would force my overload to the top on other developers' machines, so that by default they would use the method I want them to use (and I'm not saying that's advisable). No one else has Visual Assist.
MusiGenesis