Guest
Public paste!

Untitled

By: a guest | Nov 18th, 2008 | Syntax: C | Size: 0.50 KB | Hits: 220 | Expires: Never
Copy text to clipboard
  1. using System;
  2. using System.Text.RegularExpressions;
  3. namespace myapp
  4. {
  5.     class Class1
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             String stextbox = "trees";
  10.             String sletters = Regex.Replace(@"ABCDEFGHIJKLMNOPQRSTUVWXYZ", @"[" + stextbox + "]", "", RegexOptions.IgnoreCase);
  11.             char[] cletters = sletters.ToCharArray();
  12.             foreach (char c in cletters)
  13.             {
  14.                 Console.WriteLine("%{0}%", c);
  15.             }
  16.         }
  17.     }
  18. }