Sub procedure that prints payment information. : Sub « Class Module « VB.Net Tutorial






Module Tester

   Sub Main()

      PrintSub(40, 10.5)
      PrintSub(38, 21.75)
      PrintSub(20, 13)
      PrintSub(50, 14)

   End Sub

   Sub PrintSub(ByVal hours As Double, ByVal wage As Decimal)

      Console.WriteLine("The payment is {0:C}", hours * wage)
   End Sub

End Module
The payment is $420.00
The payment is $826.50
The payment is $260.00
The payment is $700.00








6.1.Sub
6.1.1.Define a sub routine and call it
6.1.2.Sub procedure that prints payment information.