Replacing characters in C# (ascii)

前端 未结 7 980
挽巷
挽巷 2020-12-05 08:26

I got a file with characters like these: à, è, ì, ò, ù - À. What i need to do is replace those characters with normal characters eg: à = a, è = e and so on..... This is my c

7条回答
  •  难免孤独
    2020-12-05 09:27

    Use this:

         if (line.Contains(“OldChar”))
         {
            line = line.Replace(“OldChar”, “NewChar”);
         }
    

提交回复
热议问题