title: c# - Asserting with OR condition
body: <p>i am checking a string for three characters</p>
  
  <pre><code>Assert.AreEqual(myString.Substring(3,3), "DEF", "Failed as DEF  was not observed");
  </code></pre>
  
  <p>the thing is here it can be <code>DEF</code> or <code>RES</code>, now to handle this what i can think of is the following</p>
  
  <pre><code>bool check = false;
  if( myString.Substring(3,3) == "DEF" || myString.Substring(3,3) == "RED" ) 
  check = true;
  
  Assert.IsTrue(check,"Failed");
  Console.WriteLine(""Passed);
  </code></pre>
  
  <p><strong>IS THERE a way i can use some OR thing within Assert</strong></p>
  
  <p>p.s i'm writing unit test &amp; yes i will use ternary operator instead....</p>