Is there a setting whereby intellisense in Visual Studio will also put variables in the intellisense pop up instead of just the values for the enumerated type? It obviously knows it is supposed to be an enumeration. Maybe this is just a mechanism to keep me from putting something in there that might cause an exception.
Consider the following setup: (It's a bit contrived, and I'm sorry about that.)
Public Enum PhraseEmphasis
Monotone = 0
Question
Statement
Exclamation
CrazyExclamation
QuestioningExclamation
Cursing
End Enum
Private _emphasisFromCode as PhraseEmphasis
Public Function Speak(ByVal phrase As String, ByVal emphasis As PhraseEmphasis) as String
Select Case emphasis
Case PhraseEmphasis.Question
Return phrase + '?'
Case PhraseEmphasis.Statement
Return phrase + '.'
Case PhraseEmphasis.Exclamation
Return phrase + '!'
Case PhraseEmphasis.CrazyExclamation
Return phrase + '!!!1!eleven!!'
Case PhraseEmphasis.QuestioningExclamation
Return phrase + '?!'
Case PhraseEmphasis.Cursing
Return '!@#@%@#!'
Case Else
Return phrase
End Select
End Function
Now, in the code I have something that sets the _emphasisFromCode (obviously) and then I want to call the function. Then what happens when I start typing Speak("HelloWorld", ...) at the elipses there, I don't like the intellisense. The only thing that pops up in the intellisense is a list of all enumerations.
And now I have spent a disproportionate amount of time explaining this with respect to how much I actually care. However, my machine is really slow in compiling today.