title: enum out of range
body: <p>What is the best way to handle an invalid enum in my test function. The function is designed to allow for me to compare two items on whether they are compatible with one another or not. Ideally I would like to return false as the result if the index is out of range.</p>
  
  <pre><code>public enum VNodeClassID
          {
              Default,
              Apple,
              Orange,
              Grape,
              BlueBerry,
              Watermellon,
              // more items to be added
          }
  
          // square 2d array
          bool[,] validation = new bool[,] 
          { 
              { false, true, true, false, true, true }, 
              { false, false, true, true, false, true }, 
              { false, true, true, false, true, true }, 
              { false, true, false, true, true, false },
              { false, true, true, true, false, true },
              { false, false, true, false, true, true }
          };
  
          public void Test()
          {
              var itemA = VNodeClassID.Default;
              var itemB = VNodeClassID.Watermellon;
              bool results = validation[(int)itemA, (int)itemB];
  
              Console.WriteLine("{0}: {1}-{2}", results, itemA, itemB);            
          }
  </code></pre>