I have wrote this function to help me convert hexa to arabic language
but always there is runtime exeption which is ...
Input string was not in a correct format.
what is the problem
this is my function...
public
string Hex2Arabic(string msg){
long i; string hex; string c; string correct="";hex = msg;
if (((hex.Length % 4) != 0)){
MessageBox.Show("hexa to arabic bad length (it is not divided by 4","error");
}
while ((hex.Length > 0)){
c = hex.Substring(0, 4);
//i = int.Parse(("&H" + c));i = Int64.Parse("&h"+c);
correct = (correct + ((
char)(i)));hex = hex.Substring((hex.Length - (hex.Length - 4)));
}
return correct;}
thanks in advance...