|I need to convert a coded string back to its original ascii charcters in c#.
The string has been coded by a vb6 application that I dont have the encoding code for but I do have the decodeing code as detailed below.
Public Function QLDecryptPassword(ByVal strPassword As String) As String
Dim intCharCounter As Integer
Dim intCharASCII As Byte
Dim strDecryptedPassword As String
If (strPassword = vbNullString) Then Exit Function
intCharCounter = 1
For intCharCounter = 1 To Len(strPassword)
intCharASCII = Asc(Mid(strPassword, intCharCounter, 1))
intCharASCII = 255 - intCharASCII
strDecryptedPassword = strDecryptedPassword & Chr(intCharASCII)
QLDecryptPassword = strDecryptedPassword
can someone please let me have the equivelent c# code.
I have had a go using byte, byte, char, int convert.toint16,32.........etc but I just cant seem to get there.
any help greatly appreciated.