title: Lists & arrays c#
body: <p><strong>Hello</strong></p>
  
  <p>I am doing a logbook, where there is a menu of different options. In menu 1, the user enters his post (Title and Post). In Menu 2 you will be able to view all saved posts. You should therefore be able to see ALL posts that have been written, but the only one shown is the last written post. Does anyone know how to solve this?</p>
  
  <pre><code>public static void Main(string[] args)
  {
      List&lt;string[]&gt; loggBok = new List&lt;string[]&gt; {};
      string[] post = new string[2];
      post[0] = "Titel";
      post[1] = "Inlägg";
      DateTime tiden = DateTime.Now;
      Console.WriteLine(tiden);
      bool isRunning = true;
  
      while (isRunning)
      {
          Console.WriteLine("\n\tVälkommen till loggboken!");
          Console.WriteLine("\t[1]Skriv ett inlägg: ");
          Console.WriteLine("\t[2]Skriv ut alla inlägg");
          Console.WriteLine("\t[3]Sök inlägg");
          Console.WriteLine("\t[4]Avsluta programmet!");
          Console.Write("\nVälj meny: ");
  
          int nr;
          int.TryParse(Console.ReadLine(), out nr);
          switch (nr)
          {
              case 1:
                  Console.WriteLine("Skriv en titel till ditt inlägg: ");
                  post[0] = Console.ReadLine();
                  Console.WriteLine("Skriv ett inlägg: ");
                  post[1] = Console.ReadLine();
                  loggBok.Add(post);
                  break;
              case 2:
                  foreach (string[] text in loggBok)
                  {
                      Console.WriteLine("\nHär är dina inlägg i loggboken:\n ");
                      Console.WriteLine("Inlägg:{0} " + "\n\t{1}", text);
                  }
                  break;
              case 3:
                  Console.WriteLine("Skriv in ett ord för att söka bland dina inlägg");
                  string keyword = Console.ReadLine();
                  foreach (string[] text in loggBok)
                  {
                      if (post[0].Contains(keyword) || post[1].Contains(keyword))
                      {
                          Console.Write("\nTitel: " + post[0] + "\n" + post[1]);
                      }
                  }
                  break;
              case 4:
                  isRunning = false;
                  break;
              default:
                  Console.WriteLine("Försök igen, välj mellan 1-4!");
                  break;
          }
      }
  }
  </code></pre>