Visual Studio 2013 Intellisense does not put enum type in a place of a parameter of method

跟風遠走 提交于 2019-12-10 13:55:26

问题


For example, I have the following code:

namespace VS2013_EnumTypes
{
    class Program
    {
        enum SomeEnum
        {
            One,
            Two
        }
        static void SomeMethod(SomeEnum someEnum)
        {
            //some code
        }

        static void Main(string[] args)
        {
            SomeMethod()
        }
    }
}

In Visual Studio 2010 and 2012 I can type name of the method SomeMethod and when I type parenthesis '(' then Visual Studio 2010 and 2012 offers me to select the type SomeEnum. But Visual Studio 2013 doesn't do this. It only add for me closing parenthesis and doesn't offer me select enum type, and I am forced to type name of enum type manually.

How to force VS 2013 to show me enum type, which used as parameter of method?


回答1:


If you turn off Automatic Brace Completion (Tools->Options->Text Editor->C#) Visual Studio gives suggestions as in previous versions. Unfortunately that's just a bad workaround, but anyhow...

Hopefully this is not by design, and it might be related to this bug: http://connect.microsoft.com/VisualStudio/feedback/details/793192/vs-2013-autocompletion-of-parenthesis-breaks-intellisense.



来源:https://stackoverflow.com/questions/20588340/visual-studio-2013-intellisense-does-not-put-enum-type-in-a-place-of-a-parameter

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