title: ViewBag instead of IEnumerable in DropDownList
body: <p>I have a ViewBag passed in consisting of IDs and Titles from a class (we will call it Games). I am trying to make an Html.DropDownList using the contents of the ViewBag instead of an Enum. </p>
  
  <p>Right Now, I have the following code which is incorrect:</p>
  
  <pre><code>Html.DropDownList("GameID", new SelectList(from IEnumerable&lt;Games&gt; game in 
  Enum.GetValues(ViewBag.Games) select new { value = 
  ViewBag.Games.ID, name = ViewBag.Games.Title}, "value", "name", Model.Content.GameID))
  </code></pre>
  
  <p>I know that I need to replace the from and the in variables but I do not know what to replace them with. Any ideas? Thanks.</p>