I have e.g.
string str ='Àpple';
string strNew="";
char[] A = {'À','Á','Â','Ä'};
char[] a = {'à','á','â','ä'};
I want to look through the str and see if found replace with Ascii code 'A' . So the result should be:
strNew = 'Apple';
Here is my code:
for (int i = 0; i < str.Length; i++)
{
if(str[i].CompareTo(A))
strNew += 'A'
else if(str[i].CompareTo(a))
strNew +='a'
else
strNew += str[i];
}
But the compare function doesn't work, so what other function I can use?