How to read character in a file 1 by 1 c#
Swap the order of the operations:
if (Convert.ToInt32(ch) == 34)
{
Console.Write(@";");
}
Console.Write(ch);
e.g. don't write the original character until AFTER you've decided to output a semicolon or not.