I want my program to read a text file all characters 1 by 1 and whereever it finds inverted comma ( \" ), it adds a semicolon before that inverted comma. For eg we have a pa
Try ch = (char)reader.Peek();
ch = (char)reader.Peek();
This will read tell you the next character without reading it. You can then use this to check if it is a " or not an insert : accordingly
if (Convert.ToInt32((char)read.Peek()) == 34) Console.Write(@";")