title: Do not add to list if it is null c#
body: <p>I am trying to create a list from anonymous function. I want the list to be created if request model properties are not null. Currently, it is adding null to the list</p>
  <p><strong>Here's what I have so far</strong>:</p>
  <pre class="lang-cs prettyprint-override"><code>public void method (RequestModel request)
  {
      var create = new DtoModel
      {
          docs = new List&lt;docsModel&gt;
          {
              request.FirstDoc!= null ? runFunction(request.FirstDoc) : null,
              request.SecondDoc!= null ? runFunction(request.SecondDoc) : null,
              request.ThirdDoc!= null ? runFunction(request.ThirdDoc) : null,
          }
      };
  }
  </code></pre>
  <p>Currently, it is creating a list of count 3 even if any of the docs are null. I would list to be only created if docs are not null and the list should only contain docs that are not null. There should not be any null values. Request model can have x number of docs.</p>
  <p>I know I can use Linq to remove nulls afterwards but I am looking for a solution where it does not create null elements in list.</p>