>>The problem comes with the other three types of chars, simple escape
>>sequences (char c = '\n';), hex escapes (char c = '\xFF'), and unicode
>>escapes (char c = '\U0000';). From this I get a string like
>>{'\\','x','F','F'} and I can't figure out what part of the Framework
>can
>>convert that string to a char.
>
>Char c = "\xFF"[0];
Bah! This doesn't answer your question does it.. I've been trying to
figure it out now too, and I'm stuck.. :P
I thought this might have worked:
String s1 = @"\n\xFF\u0000";
Console.WriteLine(s1);
String s2 = String.Format(s1);
Console.WriteLine(s2);
Char c1 = s2[0];
Char c2 = s2[1];
Char c3 = s2[2];
Console.WriteLine(c1);
Console.WriteLine(c2);
Console.WriteLine(c3);
But it doesn't..
John.
===================================
This list is hosted by DevelopMentor� http://www.develop.com
Some .NET courses you may be interested in:
NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls
View archives and manage your subscription(s) at http://discuss.develop.com