title: Conditional operator assignment
body: <p>If I can assign any subtype to a supertype reference (upcasting):</p>
  
  <pre><code>IWService wService;
  wService = new WService();
  wService = new WServiceStub();
  </code></pre>
  
  <p>Why can I not assign them in a conditional operator <code>? :</code> ?</p>
  
  <pre><code>IWService wService = isStub ? new WServiceStub() : new WService();
  </code></pre>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>Type of conditional expression cannot be determined because there is
    no implicit conversion between MyNamespace.WServiceStub and MyNamespace.WService</p>
  </blockquote>
  
  <p>But it's enough to cast one of them to the supertype to compile:</p>
  
  <pre><code>IWService wService = isStub ? (IWService)new WServiceStub() : new WService();
  </code></pre>
  
  <p>or</p>
  
  <pre><code>IWService wService = isStub ? new WServiceStub() : (IWService)new WService();
  </code></pre>
  
  <p>I don't understand why I need an explicit cast if I'll never get <code>InvalidCastException</code>. The conversion is always sure, isn't it?</p>
  
  <p>Is not the following code exactly the same?</p>
  
  <pre><code>IWService wService;
  if (isStub)
  {
      wService = new WServiceStub();
  }
  else
  {
      wService = new WService();
  }
  </code></pre>