Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27046

VS 2010 Visual Basic 2010 programming with If Then Else Statement

$
0
0
I need
Code:

  If HoursParked <= 3 Then
            CurrentCustomer = 2
        ElseIf HoursParked <= 23 Then
            CurrentCustomer = 2
            CurrentCustomerTextBox.Text = Convert.ToString(CurrentCustomer) & ControlChars.Tab
            CurrentCustomer = (Convert.ToDouble(HoursParkedTextBox.Text) - 2) * 0.5
            CurrentCustomerTextBox.Text &= Convert.ToString(CurrentCustomer) & ControlChars.Tab
            CurrentCustomer = CurrentCustomer + 2
        Else
            CurrentCustomer = 10
        End If



To show up that any number 3 or less shows up as 2 and then any number between 4 and 23 show up as 2 + however many hours are needed -3 *.5 then if it is 24 hours, the number is automatically 10.
I have the ControlChars.Tab there to show each line separately so that each values display.

Viewing all articles
Browse latest Browse all 27046

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>