Public Class 例5_1

    Public Enum OPERATE
        Add = 1
        Modify
        Delete
        Save
    End Enum
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim commandName As OPERATE
        commandName = CInt(TextBox1.Text)
        Select Case commandName
            Case OPERATE.Add
                Label2.Text = "您选择了""Add""操作"
            Case OPERATE.Modify
                Label2.Text = "您选择了""Modify""操作"
            Case OPERATE.Delete
                Label2.Text = "您选择了""Delete""操作"
            Case OPERATE.Save
                Label2.Text = "您选择了""Save""操作"
        End Select

    End Sub
End Class