Question
Change the naming convention of the variables to reflect a Double data type (e.g. Private _dblLength As Double). Public Class frmFence Private Sub totalBtn_Click(sender As
Change the naming convention of the variables to reflect a Double data type (e.g. Private _dblLength As Double).
Public Class frmFence
Private Sub totalBtn_Click(sender As Object, e As EventArgs) Handles btnTotal.Click
Dim len As Double = 0
Dim wid As Double = 0
Dim lCost As Double = 0
Dim perimeter As Double = 0
Double.TryParse(txtLength.Text, len)
Double.TryParse(txtWidth.Text, wid)
Double.TryParse(txtLCost.Text, lCost)
'Dim houseArea As My.Resources.Rectangle = New My.Resources.Rectangle()
Dim house As Rectangle = New Rectangle(len, wid)
perimeter = house.GetPerimeter()
lblTotalCost.Text = (perimeter * lCost).ToString("C2")
End Sub
Private Sub exitBtn_Click(sender As Object, e As EventArgs) Handles btnExit.Click
Me.Close()
End Sub
End Cl
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started