Hi, i write a application to search in a tree. each treenode is a unicode
text.
How to compare two unicode string to find extract node i want ?
Regards
Minh
All strings in .Net are Unicode strings. Everything is UTF-16 encoded.
Just use the standard compare algorithms (such as "="), and you'll be fine.
All you need is:
if (node1.text == "mytext")

Signature
Chris Mullins, MCSD.NET, MCPD:Enterprise
www.coversant.net/blogs/cmullins
> Hi, i write a application to search in a tree. each treenode is a unicode
> text.
> How to compare two unicode string to find extract node i want ?
>
> Regards
> Minh
Le Minh - 30 Sep 2006 08:49 GMT
I fetch some text from web. render text on a browser is good. But when i see
this text by quick watch, the character is unreadable. For that, when i
compare it with a unicode string, is not match
Jon Skeet [C# MVP] - 30 Sep 2006 08:56 GMT
> I fetch some text from web. render text on a browser is good. But when i see
> this text by quick watch, the character is unreadable. For that, when i
> compare it with a unicode string, is not match
That suggests you've got an encoding issue somewhere. See
http://www.pobox.com/~skeet/csharp/debuggingunicode.html for advice.

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too