views:

139

answers:

2

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.

A: 

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

Mercurybullet
I'm sorry, I wrote my problem incorrectly. The menu does show up, but it doesn't include my methods or anything I write.
Relikie
A: 

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.
    }
}
Kyle Trauberman