please look at these codes :
Health = HttpUtility.HtmlDecode(Health).Replace("%", string.Empty).Replace("\"", string.Empty).Replace("",string.Empty).Trim();
File.WriteAllText(@"d:\a.txt", Health);
char[] ar = Health.ToCharArray();
File.WriteAllText(@"d:\a.txt", string.Empty);
foreach (char a in ar)
{
File.AppendAllText(@"d:\a.txt", a.ToString() + Environment.NewLine);
}
int a = int.Parse(Health); //-> I Always Have Error In This Line
the output of d:\a.txt
is like :
<br>
<br>
<br>
1
0
0
<br>
<br>
<br>
there are 6 hidden and strange characters in that file and the Length of ar
array is 9
.
what are those hidden characters and how can i remove them?
why Trim()
couldn't remove those hidden characters?