Value of type Decimal cannot be converted to 1 dimensional array of Decimal
I am taking my first quarter of computer programming, and I am running into a brick wall trying to understand jagged arrays in Visual Studio 2010. At the moment I am working on a program that uses two two dimensional jagged arrays, and I cannot figure out how to properly pass information into one of them. I have posted the code below. The part that is in bold is where the error message pops up that "Value of type decimal cannot be converted to 1 dimensional array of Decimal." Help!
If IsNothing(g_decChargesArray(g_intActivePatientNumb er)) Then
numVisits = 0
Dim decTemp(g_intActivePatientNumber) As Decimal
g_decChargesArray(g_intActivePatientNumber) = decTemp
Dim strTemp(0) As String
strTemp(0) = g_dtmDate.ToString("d")
g_strVisit(g_intActivePatientNumber) = strTemp
numVisits = g_decChargesArray(g_intActivePatientNumber).Length
ReDim Preserve g_strVisit(g_strVisit.Length)
ReDim Preserve g_decChargesArray(g_decChargesArray.Length)
decCharges = CalcCharges()
If decCharges = -1 Then
MessageBox.Show("The Following Fields Will Only Accept Positive Numeric Values:" & vbCrLf & vbCrLf & "Length of Stay (Must be entered as whole number!)" & vbCrLf &
"Medical Charges" & vbCrLf & "Surgical Charges" & vbCrLf & "Lab Fees" & vbCrLf & "Physical Rehab Fees" &
vbCrLf & vbCrLf & "Please Review Your Entries and Correct Any Errors!")
g_decChargesArray(g_intActivePatientNumber) = decCharges
g_strVisit(g_intActivePatientNumber)(numVisits) = g_decTotal
|All times are GMT. The time now is 02:03 AM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.