title: Custom c# code in a Report
body: <p>I am populating a report using an Object. Everything works fine, if my members are string, however, I have a few members, which are <code>List&lt;string&gt;</code>. </p>
  
  <p>When I add these fields to the report (in designer, visual studio 2012) and run the report, they show as </p>
  
  <blockquote>
    <p>'#Error'</p>
  </blockquote>
  
  <p>Viewing the properties of the report, I can see that there is a 'custom code' tab, for which I've entered the following method to convert the list of strings into a array of string.</p>
  
  <pre><code>public string[] GetListItems(List&lt;string&gt; intList)
  {
      var s = intList.ToArray();
      return s;
  }
  </code></pre>
  
  <p>Then when I try and replace the field with an expression and enter the following:</p>
  
  <pre><code>=Join(Code.GetListItems(Fields!Aka.Value),",")
  </code></pre>
  
  <p>and then run the report, VS fails to build with the following:</p>
  
  <blockquote>
    <p>Error 2   The Value expression for the textrun ‘Aka.Paragraphs[0].TextRuns[0]’ contains an error: [BC30456] 'GetListItems' is not a member of 'ReportExprHostImpl.CustomCodeProxy'.</p>
    
    <p>Error 1   There is an error on line 0 of custom code: [BC30183] Keyword is not valid as an identifier.</p>
  </blockquote>
  
  <p>Can anyone shed any light why this is?</p>