On 31-May-09, at 7:44 PM, Karen wrote:
I am finishing up a little Checkbox drawing utility. I need to have
an Enum with one more value than does CheckBox.CheckedState for
particular function (besides "if State =
CheckBox.CheckedState.UnChecked Then..." gets to be a bit long)
So I defined a Enun in that module:
Enum CheckStates As Integer
Unchecked
Checked
Indeterminate
AllStates = -1
End Enum
But I also want to support the CheckBox.CheckedState
So I overload the methods thusly:
//---------------------------------
Sub aMethod(State as CheckState)
...
End Sub
//---------------------------------
Sub aMethod(State as CheckBox.CheckedState)
aMethod CheckState(State) ' <------ Gives error
End Sub
//---------------------------------
Why can't I cast a CheckBox.CheckedState to a CheckState? is it a bug?
Or a typo ?
Your Enum is called CheckStates not CheckState
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|