title: Blocking Strings in a chat Upper/Lower case C#
body: <p>I am attempting to create a word filter to block any words listed in a textfile from being broadcast in chat.</p>
  
  <p>The initial code works fantastically but ONLY if the words being said in chat are IDENTICAL to words in the textfile. </p>
  
  <p>I need a way for it to block the word regardless if it's in all uppercase, all lowercase or anything in between but it must match the word in the list exactly.</p>
  
  <p>e.g, it will not filter "ship, SHIP or ShIp" but it will filter.. "Sh**, SH**" you get the idea. I am open to other methods that don't include making a huge textfile list.</p>
  
  <pre><code>      foreach (var word in File.ReadAllLines("wordlist.txt"))
              {
                  if (message.Contains(word))
                   player.SendToSelf(Channel.Reliable, ClPacket.GameMessage, "You Cannot Say That Here!");
  
  
              }
  
              return true;
  }
  </code></pre>
  
  <p><strong>I have tried</strong> </p>
  
  <pre><code>if (char.IsUpper(message[0]))
               player.SendToSelf(Channel.Reliable, ClPacket.GameMessage, "You Cannot Say That Here!");
  </code></pre>
  
  <p>Something like CurrentCulture/InvariantCultureIgnoreCase/OrdinalIgnoreCase could be used, but I'm not sure how to implement such things.</p>
  
  <p>Would also be extremely beneficial to block words in foreign (other than En) language using foreign characters.</p>