Public Shared PageTotal As System.Collections.Generic.Dictionary(Of Integer, Decimal)
Public Shared Function GetTotal(ByVal Item As Integer, ByVal Amount As Decimal) As Decimal
Dim Count As Integer
Dim total As Decimal = 0
If PageTotal Is Nothing
Then PageTotal = New System.Collections.Generic.Dictionary(Of Integer, Decimal)
End If
If Not PageTotal.ContainsKey(Item)
Then PageTotal.Add(Item, Amount)
For Count = 1 To Item total = total + PageTotal(Count)
Next
Return total
End Function