I am working on verifying Vin numbers and cannot figure out how to take my converted array, which is the result of the first sub and multiple each one of the numbers to set of weighted values.

For instance I have taken the VIN shown in the string below and converted it to this 41312348565041183, which is correct. Now I need to take each number in that string and multiply it like this:

1st Position * 8
2nd position * 7
3rd position * 6
4th position * 5

Would be

4 * 8 = 32
1 * 7 = 7
3 * 6 = 18
1 * 5 = 5

and so on. Here is the code I have so far. My trouble is in the CalcVin Sub.


VB Code:
  1. Private Sub ConvertVin()
  2.  
  3.         Dim strVin As String = "4A3AK34Y5WE041183"
  4.         Dim arrVin(16) As Char
  5.         arrVin = strVin.ToCharArray
  6.  
  7.         Dim c As Char
  8.         For Each c In arrVin
  9.             txtResults.Text += CStr(VinAlphaConvert(c))
  10.         Next c
  11.  
  12.     End Sub
  13.  
  14.     Private Sub CalcVin()
  15.         Dim strConVin As String = txtResults.Text
  16.         Dim arrVin(16) As Integer
  17.  
  18.         arrVin(0) += arrVin(0) * 8
  19.         MessageBox.Show(CStr(arrVin(0)))
  20.  
  21.         'Dim c As Char
  22.         'arrVin(0) += CChar(CStr(CInt(Val(c)) * 8))
  23.  
  24.         ' I need to take each of the 17 integers and
  25.         ' multiply them by a weight factor like this
  26.         '1st = 8     10th = 9
  27.         '2nd = 7     11th = 8
  28.         '3rd = 6     12th = 7
  29.         '4th = 5     13th = 6
  30.         '5th = 4     14th = 5
  31.         '6th = 3     15th = 4
  32.         '7th = 2     16th = 3
  33.         '8th = 10    17th = 2
  34.         '9th = check digit