title: Check List lenght in rdlc report
body: <p>I'm passing a dataset to a report using an object data source. The data source contains object of a custom class. This class have a list of nested object.</p>
  
  <p>I need to output the value of 3 of these objects or <code>String.Empty</code>. So if the list contains 'A' and 'B', the report should output 'A', 'B' and ''.</p>
  
  <p>I print the value of the object in the list like so:</p>
  
  <pre><code>=Fields!MyList.Value(0).ObjectPropertyToPrint
  </code></pre>
  
  <p>However, if the list doesn't contains 3 items, I have <code>#Error</code>. </p>
  
  <p>I've tried this way </p>
  
  <pre><code>=iif(Fields!MyList.Value.Length &gt;= 2,Fields!MyList.Value(2).ObjectPropertyToPrint,"")
  </code></pre>
  
  <p>and </p>
  
  <pre><code>=iif(Fields!MyList.Value.GetUpperBound(0) &gt;= 2,Fields!MyList.Value(2).ObjectPropertyToPrint,"")
  </code></pre>
  
  <p>But both results in <code>#Error</code></p>
  
  <p>I also tried to output only </p>
  
  <pre><code>=Fields!MyList.Value.Length
  =Fields!MyList.Value.GetUpperBound(0)
  </code></pre>
  
  <p>But both printed <code>#Error</code></p>
  
  <p>This is the C# List object I'm using. It's only a workaroung to pass nested object to rdlc</p>
  
  <pre><code>[Serializable]
  public class MyObjectList : List&lt;MyObject&gt;
  {
      public MyObjectList () { }
  }
  </code></pre>