title: DisplayNameFor() From List<Object> in Model
body: <p>I believe this is pretty simple, I just can't seem to find the right way to show the display name for an item within a list within my model.</p>
  <p>My simplified model:</p>
  <pre><code>public class PersonViewModel
  {
      public long ID { get; set; }
      
      private List&lt;PersonNameViewModel&gt; names = new List&lt;PersonNameViewModel&gt;();
  
      [Display(Name = &quot;Names&quot;)]
      public List&lt;PersonNameViewModel&gt; Names { get { return names; } set { names = value; } }      
  }
  </code></pre>
  <p>and Names:</p>
  <pre><code>public class PersonNameViewModel
  {
      public long ID { get; set; }
  
      [Display(Name = &quot;Set Primary&quot;)]
      public bool IsPrimary { get; set; }
  
      [Display(Name = &quot;Full Name&quot;)]
      public string FullName { get; set; }
  }
  </code></pre>
  <p>Now I'd like to make a table to show all the names for a person, and get the <code>DisplayNameFor</code> <code>FullName</code>.  Obviously,</p>
  <pre><code>@Html.DisplayNameFor(model =&gt; model.Names.FullName);
  </code></pre>
  <p>wouldn't work, and</p>
  <pre><code>@Html.DisplayNameFor(model =&gt; model.Names[0].FullName);  
  </code></pre>
  <p>will break if there are no names.  Is there a 'best way' to obtain the display name here?</p>