I am trying to figure out how to add a decimal value into an array. I have stated the structure state and the DIMs and Constants But I keep getting an error when ttrying to load the information in the array.
I keep trying something like Small(1).Decimal = $5.99D
But this keeps throwing an error.
Any help is much appreciated on how to add decimal values into an array.
I have had success with this technique in the past when it comes to displaying simple string information.
Below is the beinging of my program.
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class MamasJanesPizza
Inherits System.Windows.Forms.Form
Structure STATE
Dim regularDecimal
Dim stuffedDecimal
End Structure
Dim Small(2) As Decimal
Dim Medium(2) As Decimal
Dim Large(2) As Decimal
Dim Monster(2) As Decimal
Const TAX_RATE_Decimal As Decimal = 0.08D
Const PEPPERS_Decimal As Decimal = 0.075D
Const ONIONS_Decimal As Decimal = 0.075D
Const CHEESE_Decimal As Decimal = 0.075D
Const NONE_Decimal As Decimal = 0D
Const COUPON_Decimal As Decimal = 0.1D
Const PREFEERED_Decimal As Decimal = 0.15D
Private Sub MamasJanesPizza_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Load the state information into the array
Small(1).ToString()
Small(2).ToString(
End Sub
I keep trying something like Small(1).Decimal = $5.99D
But this keeps throwing an error.
Any help is much appreciated on how to add decimal values into an array.
I have had success with this technique in the past when it comes to displaying simple string information.
Below is the beinging of my program.
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class MamasJanesPizza
Inherits System.Windows.Forms.Form
Structure STATE
Dim regularDecimal
Dim stuffedDecimal
End Structure
Dim Small(2) As Decimal
Dim Medium(2) As Decimal
Dim Large(2) As Decimal
Dim Monster(2) As Decimal
Const TAX_RATE_Decimal As Decimal = 0.08D
Const PEPPERS_Decimal As Decimal = 0.075D
Const ONIONS_Decimal As Decimal = 0.075D
Const CHEESE_Decimal As Decimal = 0.075D
Const NONE_Decimal As Decimal = 0D
Const COUPON_Decimal As Decimal = 0.1D
Const PREFEERED_Decimal As Decimal = 0.15D
Private Sub MamasJanesPizza_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Load the state information into the array
Small(1).ToString()
Small(2).ToString(
End Sub