title: Resolving "An object reference is required for the non-static field" error
body: <p>I'm facing the following error in C# Visual Studio that I just can't resolve:</p>
  
  <p><strong>"An object reference is required for the non-static field"</strong></p>
  
  <p>I don't know what it means nor how to fix it.  Sure, I checked online but didn't find anything that spoke to my simple code below.  All I want to do is call the following from Main() successfully:</p>
  
  <p>int result = MaxPair(nums);</p>
  
  <p>Many thanks in advance.</p>
  
  <hr>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  
  namespace MaxPairSpace
  {
      class Program
      {
  
          static int Main(string[] args)
          {
  
              int n = Int32.Parse( Console.ReadLine() );
  
              string input = Console.ReadLine();
              string[] split = input.Split(' ');
              int length = split.Length;
              int[] nums = new int[length];
              for (int x = 0; x &lt; length; x++)
              {
                  nums[x] = Int32.Parse(split[x]);
              }
  
              int result = MaxPair(nums);
  
              Console.WriteLine("{0}\n", result);
              return 0;
          }
  
          public int MaxPair(int[] numbers)
          {
              int result = 0;
              int n = numbers.Length;
              for (int i = 0; i &lt; n; ++i)
              {
                  for (int j = i; j &lt; n; ++j)
                  {
                      if (numbers[i] * numbers[j] &gt; result)
                      {
                          result = numbers[i] * numbers[j];
                      }
                  }
              }
              return result;
          } 
      }
  }
  </code></pre>