I create wpf application. And some case I compare two string values. local value comes from richtextbox, and richtextbox value comes from word document. I try every solution on this site. But nothing changed. The comparision equal to false. I try replace end of file with linkedWord.Replace((char)160, (char)32);
Try string.Compare
String.Compare(wr.Orthography, linkedWord, StringComparison.OrdinalIgnoreCase) == 0
Use Encoding to byte array and SequanceEqual and more, but can not find solution. Please help me to solve this problem.
The value comes from richtextbox:
the value comes from database:
EDIT:
After Compare method result is -1