/* * Created by SharpDevelop. * User: Administrator * Date: 2009-06-08 * Time: 8:52 AM * * To change this template use Tools | Options | Coding | Edit Standard Headers. */ using System; namespace testadgt34 { class Program { public static void Main(string[] args) { char[] a = System.IO.Path.GetInvalidFileNameChars(); char[] b = System.IO.Path.GetInvalidPathChars(); int n = a.Length; Array.Resize(ref a, a.Length + b.Length); for (int i = 0; i < b.Length; i++) { bool add = true; for (int j = 0; j < n; j++) { if (a[j] == b[i]) { add = false; break; } } if (add) { a[n] = b[i]; n++; } } Array.Resize(ref a, n); Array.Sort(a); for (int i = 0; i < a.Length; i++) { int c = char.ConvertToUtf32(new string(a[i], 1), 0); Console.WriteLine("0x" + c.ToString("X")); } Console.Write("Press any key to continue . . . "); Console.ReadKey(true); } } }