C
Charles Law
I have just run FxCop and it reported a problem line 2 of the following:
<code>
Select Case e.Tool.Key.ToUpper
Case "FirstOption".ToUpper
' Do stuff
Case "SecondOption".ToUpper
' Do other stuff
Case Else
' Ignore anything else
End Select
</code>
It suggests that I should not create strings that are not subsequently
assigned to a variable, but to use String.Compare() instead.
Any thoughts on how one could do this and still use Select ... Case?
TIA
Charles
<code>
Select Case e.Tool.Key.ToUpper
Case "FirstOption".ToUpper
' Do stuff
Case "SecondOption".ToUpper
' Do other stuff
Case Else
' Ignore anything else
End Select
</code>
It suggests that I should not create strings that are not subsequently
assigned to a variable, but to use String.Compare() instead.
Any thoughts on how one could do this and still use Select ... Case?
TIA
Charles