title: How to find and prioritize words from a given Enum list?
body: <p>I have an ENUM defined as follows:</p>
  
  <pre><code> public enum TextType {
       JOIN,
       SUBSCRIBE,
       STOP,
       HELP,
       CANCEL,
       UNSUBSCRIBE,
       UPGRADE,
       BALANCE,
       USAGE
    }
  </code></pre>
  
  <p>I would like to prioritize this and filter it as follows:</p>
  
  <p>Yes (if phone is not yet verified to receive text then accept this text; else ignore and go to the next one) 
    stop, cancel, unsubscribe
    Help
    Balance or USAGE
    UPGRADE</p>
  
  <p>So basically when the User sends a Text say "YES BALANCE" then internally first I do a check to see if the phone number
   is registered. If registered then I should use the text "Balance" and return the balance. But if the phone us unregistered
   then I should use the text "YES" to register the phone first and ignore the rest. 
   My issue is currently I am using the Enum.IsDefined to find out if the above is a valid Text and since we have two 
   different texts combined it fails right away. </p>
  
  <pre><code> if (Enum.IsDefined(typeof(TextType), VtextType))
  </code></pre>
  
  <p>So how do I rewrite the below IF condition in C# so that I am able to accept both 'Yes' and 'Balance'. Should I change the definition of my Enum or should I use "contains" or should I use regex? I am using .Net4.5 </p>
  
  <p>Please help. </p>
  
  <p>After Michaels reply can I loop through the string of array as:</p>
  
  <pre><code>foreach (string s in Tokens)
  {
      Console.WriteLine(s);
  }
  </code></pre>
  
  <p>Will this work? </p>