title: Compare int input to position of array
body: <p>C# noob here, trying to experiment with different ways of solving a basic problem. I want to pass in an argument to a method and in that method I loop through an array of months. If the argument equals the position of the array, I want to return the string of that array position.</p>
  
  <p>I've tried the following:</p>
  
  <pre><code>class Month
  {
      private int month;
  
      public string strMonth(int month)
      {
          this.month = month;
  
          string[] months = { " ", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" };
  
          for (int i = 0; i &lt; months.Length; i++)
          {
              if (month == Array.IndexOf(months, i))
              {
                  return months[i];
              }
          }
  
          return "check fails";
      }
  }
  </code></pre>
  
  <p>And for my driver I'm using</p>
  
  <pre><code>class Program
  {
      static void Main(string[] args)
      {
          Month testMonth = new Month();
  
          Console.WriteLine(testMonth.strMonth(2));
  
          Console.ReadKey();
      }
  }
  </code></pre>
  
  <p>However, I'm always getting <code>check fails</code> logged in the console. Am I on the right path or has the noobness prevailed and I'm doing this totally wrong? I'm also confused about the block level scoping (I think that's what C# does?). I come from a JS background and I'm used to function level scope. Will adding the <code>return "check fails"</code> always execute even if my check passes?</p>