How can i compare this two value? is there any idea?
Please look at this image and tell me what can i do?
1- The code
2- variable values and it seams the same!
3- The output that shows it is not OK! and these values are not the same!
4- I understand that the only different between these two values are in 2 bytes of them. (I use this link for getting byte[] of string with UTF8 property)
Solution:
I wrote this extension method to solve the problem:
public static class FarsiExtension
{
public static string FixYEH(this String instance)
{
return instance.Replace('ي', 'ی');
}
}
and you can use it this way:
string fixedValue = stateKhedmat.ToString().FixYEH();