Results 1 to 2 of 2

Thread: enum Help

  1. #1

    Thread Starter
    Registered User
    Join Date
    Jul 2001
    Posts
    283

    enum Help

    I have this enum:

    Public Enum Letters As Byte
    a = 1
    b = 2
    c = 3
    End Enum

    dim mbyte as byte = 2



    how do i get the name associated with mbyte?

    thanks...

  2. #2
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769
    Try (place after the your code):
    Code:
    Dim mletter As Letters = CType(mbyte, Letters)
    MsgBox(mletter.ToString)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width