how do you associate a variable with an enumeration so that when you type myVariable=the enumerations pop up with intellisense

I am using vb.net and am a real novice
I have the following code
Public Enum mMode
        editWord
        editLine
        playWord
        playLine
    End Enum
then I have a variable called myMode
and I type myMode=mMode.editWord
How do you code it so that as soon as I type myMode= all the possible mMode enumerations pop up?
Dov_BAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mirzasCommented:
when you type the enimeration name and hit the "dot" you will get a list of items inside the enum.
0
brenz08Commented:
Try using the following code below, if you do not yet have a similar code to the one you are wanting help on.

Then, when wanting to use MyMode, type the following: " MyMode. " and a list should come up showing your vairables under mMode (editWord, editLine, playWord, playLine).

Try that and see how you go.
Public Enum mMode
    editWord
    editLine
    playWord
    playLine
End Enum
 
Dim MyMode As mMode
 
'you can also use the following when coding (if this works in .NET) ??
With MyMode
    .editWord = "123"    'makes "editWord" have the value 123
    .editLine = "456"    'when coding, and placing a dot, a list
End With                 'should automatically appear.

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
brenz08Commented:
Actually, ignore my comment, and code!!
Got confused with the wrong thing..Argh!

When you type "MyMode=" it should automatically come up with a list of enumerations...It does with me?

Thanks.
0
brenz08Commented:
Thanks Dov_B,
Hope all goes well.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.