generate a dropdown list from array data using razor .net mvc

C#
@Html.DropDownList("myList", ViewBag.myList as SelectList)
Source

Also in C#: