Alternatively, using the @
operator ensures that the string is represented exactly as it appears in code:
foreach (KeyValuePair<int, string> p in Helper.Dict)
{
// file.WriteLine(string.Format("{0} | {1}",p.Key,p.Value));
file.WriteLine(@"{" + string.Format("Enum.{0},\"{1}\"", p.Value,p.Value) + @"}");
}