EDIT: This ((char)tr.Read() == '&') which is right above it works fine. And I have initialized the char array as:
while (charTemp[i] != '%'){ charTemp[i] = (char)tr.Read(); i++;}
ThanksAaron