title: ?: Operator return void
body: <p>I want to use the <code>?:</code> operator intstead of <code>if else</code></p>
  
  <p>e.g.</p>
  
  <pre><code>var directory = new DirectoryInfo(path);
  if (!directory.Exist())
  {
      directory.Create();
  }
  else 
  {
      // do nothing
  }
  </code></pre>
  
  <p>I tried to use <code>?:</code> like this: </p>
  
  <pre><code>var directory = new DirectoryInfo(path);
  !directory.Exist() ? directory.Create() : void;
  </code></pre>
  
  <p>but it says "Invalid expression term <code>void</code>", <code>null</code> also isn't working.</p>
  
  <p>Can anyone tell me a solution?</p>