viewBag as a list

C#
<td>@((ViewBag.data as ICollection<Person>).First().FirstName)</td><ul>
    @foreach (var person in ViewBag.data)
    {
        <li>@person.FirstName</li>
    }
</ul>
Source

Also in C#: