English 中文(简体)
Intellisense not showing anything I write
原标题:

I am using Visual C# 2008 express. I m also running Windows 7. I created a simple form, but Intellisense doesn t show anything I wrote. I write:

private RadioButton rbtn_sortLocation;

And then when I write rbtn,Intellisense pops up, but it doesn t show rbtn_sortLocation. But after writing out a whole line, it doesn t complain about an error. How do I get Intellisense to show my methods and such?

Also: This is only happening to solutions I create on this computer. All of the solutions I created on my old XP machine work fine.

问题回答

You can give Ctrl + Space a shot. Its a way to pull up the Intellisense menu manually.

You can also check your options to make sure its turned on. I believe the intellisense option is under Tools -> Options -> Text Editor -> (All Languages or the language you are using) -> Statement Completion section -> Auto list members

Where are you writing rbtn and trying to open intellisense? Also, where is this RadioButton declared?

Intellisense populates the menu with options based on the scope. For example: (assuming the RadioButton is declared at class-level)

class MyClass 
{
    private RadioButton rbtn_sortLocation;

    // Intellisense will not show the RadioButton in this scope.
    // This is the class scope, not in a method.

    static void StaticMethod() 
    {
        // Intellisense will not show the RadioButton in this scope.
        // The RadioButton is not static, so it requires an instance.
    }

    class InnerClass
    {
        // Intellisense will not show the RadioButton in this scope.
        // This is the class scope, not in a method.

        void InnerClassMethod()
        {
            // Intellisense will not show the RadioButton in this scope.
            // Members of the outer class are not accessible to an inner class.
        }
    }

    public MyClass()
    {
        // Intellisense WILL show the radio Button in this scope.
        // class members are accessible to the constructor.
    }

    void Method()
    {
        // Intellisense WILL show the radio Button in this scope.
        // class members are accessible to instance methods.
    }
}




相关问题
How to speed up Visual Studio 2008? Add more resources?

I m using Visual Studio 2008 (with the latest service pack) I also have ReSharper 4.5 installed. ReSharper Code analysis/ scan is turned off. OS: Windows 7 Enterprise Edition It takes me a long time ...

Trouble with VS.PHP installing it s own Apache server

I tried installing VS.PHP some time ago. I was intent on seeing how it works with my current setup. I immediately encountered trouble: none of my sites wanted to render. On windows, I m using WAMP ...

Jquery and Intellisense in VS 2008 with hotfix and SP1

I followed Scott Guthrie s instructions as outlined at http://weblogs.asp.net/scottgu/archive/2008/11/21/jquery-intellisense-in-vs-2008.aspx but no avail: intellisense still doesn t work. Any tips?

Fixing "error C2065: undeclared identifier"

First off, I m completely out of my depth here. So the question might be the wrong one to ask, but here goes... As per the accepted answer to this question, I m trying to compile the bindings for the ...

View whitespace in VS2008

After Jeph most recent post: http://www.codinghorror.com/blog/archives/001310.html, I thought to myself it would be fun to see if any of my code has those trailing whitespaces. So I open Visual ...

热门标签