Assuming you are referencing the Microsoft.VisualBasic dll from your source code, which is not the best approach in my oppinion, you could modify the error line using:
Pass2 = Pass2 + Strings.Chr(Strings.Asc(Code) ^ (int)Conversion.Val("&h" + CAR));
A clean c# solution would be:
Pass2 = Pass2 + Strings.Chr(Convert.ToInt32(Code) ^ Convert.ToInt32("&h" + CAR));
Hope that helps