title: Create two random lists from one list
body: <p>I want to take a List of strings with around 12 objects and split it into two List of strings but completely randomise it.</p>
  
  <p>Example of List:</p>
  
  <p>List 1:</p>
  
  <pre><code>EXAMPLE 1
  EXAMPLE 2
  EXAMPLE 3
  EXAMPLE 4
  EXAMPLE 5
  EXAMPLE 6
  EXAMPLE 7
  EXAMPLE 8
  </code></pre>
  
  <p>Apply some logic here...</p>
  
  <p>Result gives me two lists:
  List 1:</p>
  
  <pre><code>EXAMPLE 5
  EXAMPLE 6
  EXAMPLE 1
  EXAMPLE 8
  </code></pre>
  
  <p>List 2:</p>
  
  <pre><code>EXAMPLE 2
  EXAMPLE 3
  EXAMPLE 4
  EXAMPLE 7
  </code></pre>
  
  <p>I'm a newbie to C# MVC, so I've found some answers on Stack but none have been able to answer my question.</p>
  
  <p>Edit:
  What I've tried so far gives me one random member of the team. I want to now expand on this and create the two lists as mentioned above.</p>
  
  <pre><code>  [HttpPost]
      public ActionResult Result(Models.TeamGenerator model)
      {
          var FormNames = model.Names;
  
          string[] lines = FormNames.Split(
              new[] { Environment.NewLine },
              StringSplitOptions.None);
  
          List&lt;string&gt; listOfLines = new List&lt;string&gt;();
  
          foreach (var i in lines)
          {
              listOfLines.Add(i);
          }
          string[] result1 = listOfLines.Where(item =&gt; item != string.Empty).ToArray();
  
          Random genRandoms = new Random();
          int aRandomTeam = genRandoms.Next(listOfLines.Count);
  
          string currName = listOfLines[aRandomTeam];
  
          return View();
      }
  </code></pre>
  
  <p>*EDIT** Thanks for the solution! I've now got my application working and managed to publish it to the web, <a href="https://www.teamgenerator.online" rel="nofollow noreferrer">https://www.teamgenerator.online</a>.</p>