title: Trying to handle menu and movies
body: <p>I have 2 C# questions:</p>
  
  <ul>
  <li>Question 1: how do I get 20 movies with highest rating? </li>
  <li>Question 2: how do I make a menu in this?</li>
  </ul>
  
  <p>My code:</p>
  
  <pre><code>using System;
  using System.Collections.Generic
  using System.Xml;
  using System.Linq;
  
  namespace XXSlutuppgift_Movie { 
      class Program {
          static void Main(string[] args) {
              List&lt;Movie&gt; movieCollection = GetMovieCollection();
              List&lt;Movie&gt; Orderedlist = movieCollection.OrderBy(Film =&gt; Film.name).ToList();
              List&lt;Movie&gt; Top20MovieRating = movieCollection.OrderBy(Film =&gt; Film.rating).ToList();
              List&lt;Movie&gt; MovieYear = movieCollection.OrderBy(Film =&gt; Film.year).ToList();
              List&lt;Movie&gt; LetterSearch = movieCollection.OrderBy(Film =&gt; Film.name).ToList();
  
              static List&lt;Movie&gt; GetMovieCollection() {
                  List&lt;Movie&gt; list = new List&lt;Movie&gt;();
                  XmlDocument doc = new XmlDocument();
                  doc.Load(System.Environment.CurrentDirectory + "/moviecollection.xml");
                  XmlNode node = doc.DocumentElement.SelectSingleNode("/MovieCollection/Movies");
                  foreach(XmlNode row in node.ChildNodes) {
                      Movie item = new Movie();
                      item.id = Int32.Parse(row.SelectSingleNode("Id").InnerText);
                      item.name = row.SelectSingleNode("Name").InnerText;
                      item.rating = Double.Parse(row.SelectSingleNode("Rating").InnerText.Replace(".", ","));
                      item.votes = Int32.Parse(row.SelectSingleNode("Votes").InnerText);
                      item.year = Int32.Parse(row.SelectSingleNode("Year").InnerText);
                      list.Add(item);
                  }
              return list
          }
      }
  }
  </code></pre>