var settings = new JsonSerializerSettings
{
StringEscapeHandling = StringEscapeHandling.EscapeHtml
};
var tr = @Newtonsoft.Json.JsonConvert.SerializeObject(traingObj, settings);
var path = "2.txt";
var lines = File.ReadAllLines(path);
var newLines = new List<string>();
foreach (var line in lines)
{
newLines.Add(line.Remove(line.Length - 1) + line.Last().ToString().ToUpper());
}
File.WriteAllLines(path, newLines);