• Log in or sign up for an account here: https://www.sythe.org/login

helo with displayInfo()

  • Thread starter Thread starter ludasky
  • Start date Start date
L

ludasky

Guest
helo with displayInfo()
hi,

i would like to Display the outcome in a labelBox but i cant get it to work for some reason using displayInfo(), anyone got any idea?it says displayInfo is not declared

Option Explicit On
Option Strict On


Public Class Form1
' declare Varibles

Private aSalariedEmployee As SalariedEmployee
Private aCommissionEmployee As CommissionEmployee
Private anEmployee As Employee
Private weeklyPay As Decimal = 0
Private salary As Decimal = 0
Private sales As Decimal = 0
Private salaryIsConverted As Boolean = False
Private salesIsConverted As Boolean = False





Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'instantiate objects

If RadioButton1.Checked Then
salaryIsConverted = Decimal.TryParse(MaskedTextBox1.Text, salary)
aSalariedEmployee = New SalariedEmployee(TextBox1.Text, TextBox2.Text, salary)

weeklyPay = aSalariedEmployee.AnnualSalary / 52

'Cast aSalariedEmployee as Employee
anEmployee = aSalariedEmployee
displayInfo()
 
helo with displayInfo()
If you want to display something in a label with code, you need to say:
Code:
NameofTheLabel.Text = WhatYouWantItToSay
The replacements I believe are obvious.
 
Runescape Gamblingrunescape gambling
Back
Top