I must convert the following VB.NET code to Basic4Android code.
I tried many things. This is what I came up with, and it generates an exception at runtime. I knew it wouldn't work, but after searching the forums I just don't see a way to do this.
Any assistance would be appreciated
B4X:
Dim iCheckSumTotal As Integer
Dim sCheckSumTotal As String
Dim sCheckSumResponse As String
Dim i As Integer
Dim iCommandLength As Integer
iCommandLength = command.Length
i = 0
While i < iCommandLength
iCheckSumTotal = iCheckSumTotal + Convert.ToInt32(Convert.ToChar(command.Substring(i, 1)))
i += 1
End While
I tried many things. This is what I came up with, and it generates an exception at runtime. I knew it wouldn't work, but after searching the forums I just don't see a way to do this.
B4X:
Dim iCheckSumTotal As Int
Dim sCheckSumTotal As String
Dim sCheckSumResponse As String
Dim i As Int
Dim iCommandLength As Int
iCommandLength = command.Length
i = 0
Do While i < iCommandLength
Dim charatt As String = command.CharAt(i)
iCheckSumTotal = iCheckSumTotal + charatt
i = i+ 1
Loop
Any assistance would be appreciated