Check out example codes for "cshtml foreach display". It will help you in understanding the concepts better.

Code Example 1

@for (int i=0; i < Model.allemp.Count;i++)
{
<tr>

    <td>@Html.Label(Model.allemp[i])</td>

    <td>@Html.Label(Model.alldept[i])</td>


</tr>

}

Code Example 2

@foreach (var item in Model.Foos)
{
    <div>@item.Bar</div>
}

Learn ReactJs, React Native from akashmittal.com