Results 1 to 4 of 4

Thread: Enums

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2002
    Posts
    12

    Enums

    hey guys..

    I have a enum:

    Code:
        Enum eStatus
    
            Ready                       ' 0 - Control is ready for use
            Connecting                  ' 1 - Connecting to host
            Connected                   ' 2 - Connected to host
            Waiting                     ' 3 - Sending/Retriving data
            Done                        ' 4 - Complete Sending/Retriving data
    
        End Enum
    instead of using a switch method like this

    Code:
            Select Case snTest.Status 'estatus
                Case 0
                    txtStatus.Text = "Ready"
                Case 1
                    txtStatus.Text = "Connecting"
                Case 2
                    txtStatus.Text = "Connected"
            End Select
    is there any faster way?

    Like i want to fill a combo box with all the enums values(not the number, but the text)
    how would i do that

  2. #2

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2002
    Posts
    12
    great thx alot buddy

    btw, can somone tell me whats the diff from short and interger?

  4. #4
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    The length:
    (.net) Short = (vb6) interger
    (.net) Interger= (vb6) long

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