I know this is asking a bit of a favour. but this is part of a function that I am trying to Import over from VB.net to C# but I am stuck I have the rest of the function working but I can not get this figured out.
Can someone please explain how I can do this.
The main parts i'm having trouble with are.
The Ascii conversion in: lngbcc = lngbcc + Asc(Mid(ReadingString, lngN, 1))
and the conversion to HEX in the last line.
I have figured out the SubString parts to replace the Mid function.
and the for loop is no problem.
Any Help would be great thanks.
Can someone please explain how I can do this.
The main parts i'm having trouble with are.
The Ascii conversion in: lngbcc = lngbcc + Asc(Mid(ReadingString, lngN, 1))
and the conversion to HEX in the last line.
I have figured out the SubString parts to replace the Mid function.
and the for loop is no problem.
Any Help would be great thanks.
Visual Basic:
Dim lngbcc As Long
Dim lngN As Long
Dim YY As String
lngbcc = 0
For lngN = 2 To Len(ReadingString)
lngbcc = lngbcc + Asc(Mid(ReadingString, lngN, 1))
lngbcc = lngbcc And 255
Next lngN
YY = Hex(lngbcc)
Last edited: