I have a simple C# console code, which converts html name to their corresponding symbols.
Example
:- €
-> this is euro html name , €
->. this is decimal code for euro;
My code will convert this name to euro symbol-> €
But when I am converting ₹ to ₹ , it not working.
My Console Application code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Text.RegularExpressions;
namespace Multiple_Replace
{
class Program
{
static void Main(string[] args)
{
var input = " ₹ 5000 €";
var replacements = new Dictionary<string, string> { { "₹", "₹" }, {"€", "€"} };
var output = replacements.Aggregate(input, (current, replacement) => current.Replace(replacement.Key, replacement.Value));
Console.WriteLine(output);
Console.ReadLine();
}
}
}
Please help me out.