I made an error CompareNoCase is for CString of C++ and not for C# but its CompareTo and I guess the best option is to make each of them to the same case.