How to choose overload method suggestion order in VS?

与世无争的帅哥 提交于 2019-12-24 11:55:55

问题


Say a class has a some methods with same name and different parameters. How do I tell VS to suggest them in a particular order?


回答1:


It can't be done. Simples. Overloads are ordered ascending by the number of parameters. Suspect you would indeed need to write a plug in.




回答2:


You should keep to the convention of having all common parameters appear in the same order in every overload. From MSDN:

Do be consistent in the ordering of parameters in overloaded members. Parameters with the same name should appear in the same position in all overloads.

I don't think there's a way of ordering Intellisense without creating a plugin that interacts with it.



来源:https://stackoverflow.com/questions/24232324/how-to-choose-overload-method-suggestion-order-in-vs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!