Dear All,
Please help this is driving me mad!
Thanks in advance
I get the following error:
[error]
Input string was not in a correct format.
[/error]
I have also tried the following:
Please help, thanks.
Thank you,
Kind regards
Triacona
Please help this is driving me mad!
Thanks in advance
Code:
try
{
var emailAddr = "etpienaar@yahoo.com";
byte[] emailAddrByteArr = new byte[emailAddr.Length];
string[] emailAddStArr = new string[]{"e","t","p","i","e","n","a","a","r","@","y","a","h","o","o",".","c","o","m"};
//string[] emailAddStArr = new string[emailAddr.Length];
char[] emailCharArr = emailAddr.ToCharArray();
for (int i = 0; i < emailAddr.Length; i++)
{
//Console.WriteLine(emailCharArr[i]);
Console.WriteLine(emailAddStArr[i]);
emailAddrByteArr[i] = byte.Parse(emailAddStArr[i]);
}
[error]
Input string was not in a correct format.
[/error]
I have also tried the following:
Code:
//emailAddrByteArr = Array.ConvertAll(emailAddStArr, s => Convert.ToByte(s, 8));
//emailAddrByteArr = Encoding.ASCII.GetBytes(emailAddr);
//Encoding srcEncoding = Encoding.Unicode;
//Encoding dstEncoding = Encoding.UTF8;
//emailAddrByteArr = Encoding.Convert(srcEncoding,dstEncoding,emailAddrByteArr);
Please help, thanks.
Thank you,
Kind regards
Triacona