Hi,
I wrote code(C#.net) in this way to find ASCII value of an URL.but i got some errors.plz rectify anyone.
public int[] stringorder(str ing str)
{
int[] result=new int[20];
char[] str1=new char[1];
for (int i = 0; i < str.Length; i++)
{
str1[0]=str[i];
result[i] = System.Convert. ToInt32(System. Text.ASCIIEncod ing.Default.Get Bytes(str1));
}
return result;
}
error:Unable to cast object of type 'System.Byte[]' to type 'System.IConver tible' at result[i].
thanks.
I wrote code(C#.net) in this way to find ASCII value of an URL.but i got some errors.plz rectify anyone.
public int[] stringorder(str ing str)
{
int[] result=new int[20];
char[] str1=new char[1];
for (int i = 0; i < str.Length; i++)
{
str1[0]=str[i];
result[i] = System.Convert. ToInt32(System. Text.ASCIIEncod ing.Default.Get Bytes(str1));
}
return result;
}
error:Unable to cast object of type 'System.Byte[]' to type 'System.IConver tible' at result[i].
thanks.
Comment