|
-
Oct 28th, 2009, 04:48 PM
#10
Thread Starter
Hyperactive Member
Re: A little confused about Enumerations
 Originally Posted by NickThissen
Another thing. What are you expecting the output of the TestEnum message box to be? If you expect "param1" to show "param1 = 1" then you should keep using what you have now. If you expect it to be "param1 = Hi" however you should use the ToString function:
Code:
Private Sub TestEnum(ByVal param1 as Greeting)
Msgbox("param1 = " & param1.ToString())
End Sub
I was expecting the output of the message box to be "param1 = 1". Thanks for the info on the ToString method in regards to enums. That can certainly come in handy.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|