Hi,
I have a string (str1) which contain a special symbol (you can see attached). I want to check if this symbol exists, so I have declared this special symbol: string str = char.ConvertFromUtf32(135); and did the following:

if (str1.Contains (str))
{
// do some stuff here...
}

It doesn't enter the if although it the symbol exists. how come?

Recommended Answers

All 2 Replies

If it does not enter your if, it can only mean that the variable str is not contained in the variable str1

You are likely comparing two different encodings. Are you sure it uses UTF32?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.