I'm writing a program which calculates price of DVD/VHS rentals. For some reason my code keeps expecting a raltional operator in my Case statements. Why? This seems pretty simple, but I can't figure it out. Should I just use if statements instead?
Code:
Public Class Form1
Const VHS As Decimal = 1.8
Const VHS_NEW_RELEASE As Decimal = 2.0
Const DVD As Decimal = 2.5
Const DVD_NEW_RELEASE As Decimal = 3.0
Const MEMBER_DISCOUNT As Decimal = 0.1
Dim ItemAmountDue, TotalAmountDue, RentalSum As Decimal
Dim CustomerCount As Integer = 0
Dim RentalNumber As Integer = 0
Private Sub CalculateButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CalculateButton.Click
If MovieTitleTextBox.Text = "" Then
MessageBox.Show("Please enter a movie title", "Input Required", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
MovieTitleTextBox.Focus()
Else
If MemberCheckBox.Checked = True Then
MemberGroupBox.Visible = False
Select Case ItemAmountDue
Case Is DVDRadioButton.Checked = True
ItemAmountDue = DVD - MEMBER_DISCOUNT
Case Is DVDRadioRadioButton.Checked And NewReleaseCheckBox.Checked
ItemAmountDue = DVD_NEW_RELEASE - MEMBER_DISCOUNT
End Select
End If
End If