title: Is there any better way to check for existance of several sub directories in C# than using nested ifs?
body: <p>I am trying to check if all the needed sub directories exists and use this snippet of code for that : </p>
  
  <pre><code>DirectoryInfo gccdir = new DirectoryInfo(txtgccPath.Text);
  List&lt;string&gt; subdirectories = new List&lt;string&gt;();
  
  foreach (var item in gccdir.GetDirectories())
  {
     subdirectories.Add(item.Name);
  }
  
  if (subdirectories.Contains("bin") &amp;&amp;
      subdirectories.Contains("i686-w64-mingw32") &amp;&amp;
      subdirectories.Contains("include") &amp;&amp; 
      subdirectories.Contains("lib") &amp;&amp;
      subdirectories.Contains("libexec") &amp;&amp; 
      subdirectories.Contains("share"))
  {
    //statements 
  }  
  </code></pre>
  
  <p>Is there any better way for doing this?<br>
  In situations like this that there is a need to verify multiple conditions, whats the best way to avoid excessive usage of if else statements? </p>