I can't seem to properly convert the following from VB.NET to C#--
iKeyChar = Asc(mid(g_Key, i, 1))
iStringChar = Asc(mid(strCryptThis,i,1))
Here's my converted C# code, which doesn't seem to output equivalent values--
iKeyChar = Convert.ToInt32(g_Key.Substring(i, 1));
iStringChar = Convert.ToInt32(strCryptThis.Substring(i, 1));
Any help is greatly appreciated!