title: Read user input from console from arrays
body: <p>Hi I'm using visual studio 2010 to learn some C#, at the moment I'm doing arrays in a console application </p>
  
  <p>i have created an array that gives the output I'm looking for. here is the code I'm using for my array </p>
  
  <pre><code>namespace ConsoleApplication3
  {
      class Program
      {
          static void Main(string[] args)
          {
  
              var lottery_numbers = new[] { "1,", "2, ", "3", "4", "5", "6", "7", "8", "9", "10" };
  
              for (var i = 0; i &lt; 10; i++)
  
              Console.WriteLine("{0}", lottery_numbers[i]);
              Console.Read();
          }
      }
  }
  </code></pre>
  
  <p>i also know that to get a user to input to the console i would need some code similar to the following:</p>
  
  <pre><code>        string numbLine;
          Console.WriteLine("display number lines: ");
          numbLine = Console.ReadLine();
          Console.WriteLine();
  </code></pre>
  
  <p>what i can't seam to figure out is i want the user to be asked how many lines to be output then it would display that number of lines from the array for user inputs</p>
  
  <p>for example the user would be asked</p>
  
  <p>how many lines for output
  the user would put 5
  the console would then output the first 5 lines from the array </p>