title: Printing an array in a method, from a different class?
body: <p>I'm a fairly inexperienced programmer, and i'm currently working on a Console Application project. It's basically a little 'mathematics game'; the application generates two random numbers, that have either been added, subtracted, multiplied or divided against each other randomly. The answer is shown on screen and the user has to pick from the menu which is the right mathematical operator, once the correct answer is picked the application then displays on screen how long it took for the user in milliseconds to input the correct answer.</p>
  
  <p>Now I want to save the times of the players in an array that can be called up later with all the scores. I need to include a method in this programme and I figured a method to save the times into an array would be suitable. I seem to have stumbled across a little problem though.</p>
  
  <p>I'm not quite sure what's wrong:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  
  namespace Mathgame
  {
      class Program
      {
      }
  
      class arrayclass
      {
          public static void saveInArray(int duration)
          {
              int[] TopTenScores = {000,1000,2000,3000,4000,5000,6000,7000,8000,9000};
  
              if (duration &lt; 1000)
              {
                  duration = TopTenScores[000];
              }
              else if ((duration &gt;= 1000) &amp;&amp; (duration &lt;= 1999))
              {
                  duration = TopTenScores[1000];
              }
              else if ((duration &gt;= 2000) &amp;&amp; (duration &lt;= 2999))
              {
                  duration = TopTenScores[2000];
              }
              else if ((duration &gt;= 3000) &amp;&amp; (duration &lt;= 3999))
              {
                  duration = TopTenScores[3000];
              }
              else if ((duration &gt;= 4000) &amp;&amp; (duration &lt;= 4999))
              {
                  duration = TopTenScores[4000];
              }
              else if ((duration &gt;= 5000) &amp;&amp; (duration &lt;= 5999))
              {
                  duration = TopTenScores[5000];
              }
              else if ((duration &gt;= 6000) &amp;&amp; (duration &lt;= 6999))
              {
                  duration = TopTenScores[6000];
              }
              else if ((duration &gt;= 7000) &amp;&amp; (duration &lt;= 7999))
              {
                  duration = TopTenScores[7000];
              }
              else if ((duration &gt;= 8000) &amp;&amp; (duration &lt;= 8999))
              {
                  duration = TopTenScores[8000];
              }
              else if ((duration &gt;= 9000) &amp;&amp; (duration &lt;= 9999))
              {
                  duration = TopTenScores[9000];
              }
  
              Console.WriteLine(TopTenScores);
          }
  
      static void Main(string[] args)
      {
          int intInput, num1, num2, incorrect, array1;
          float answer;
          string input;
  
          System.Random randNum = new System.Random();
          Console.WriteLine("Welcome to the Maths game!");
          Console.WriteLine("(Apologies for the glitchiness!)");
          Console.WriteLine();
          Console.WriteLine("Please choose from the following options:");
          Console.WriteLine();
      retry:
          Console.WriteLine("1 - Test your Maths against the clock!");
          Console.WriteLine("2 - Exit the application.");
          Console.WriteLine("3 - Top scores");
          Console.WriteLine();
          input = Console.ReadLine();
          intInput = int.Parse(input);
  
          if (intInput == 1)
          {
              goto start;
          }
          else if (intInput == 2)
          {
              goto fin;
          }
          else if (intInput == 3)
          {
  
              array1 = array1.saveInArray;
  
            goto retry;
          }
  </code></pre>
  
  <p>Now, in the last 'else if' statement in the code, you can see my variable array1 trying to call the method, but no matter what I do I keep getting errors.</p>
  
  <p>This is the only error I have at the moment, but I have a feeling soon as I resolve that error, another will come up. For now i'm just determined to get past this error:</p>
  
  <pre><code>'int' does not contain a definition for 'saveInArray' and no extension method 'saveInArray' accepting a first argument of type 'int' could be found (are you missing a using directive or an assembly reference?).
  </code></pre>
  
  <p>Any help would be kindly appreciated, apologies in advanced for my ugly written code! And thank you to any help that I receive!</p>
  
  <p>Regards,
  Omar.</p>