title: how to call String array method in main in c#
body: <p>I am new to c# and I don't understand why this isn't working. i am getting Error is subjects() in main as mentioned below.</p>
  
  <p>My code is the following:</p>
  
  <pre><code>class Program
      {
         static void Main(string[] args)
          {string sub;
             // string brd;
              brd = board();
              sub = subjects(); // Error
              //Console.WriteLine(brd);
              Console.WriteLine(sub);
              Console.ReadLine();
          }
          public static string[] subjects()
          {
          Console.WriteLine("Please Enter How many Subject Do you Want to input");
          int limit = System.Convert.ToInt32(Console.ReadLine());
              string[] Subjects = new string[limit];
              int[] index = new int[limit];
              for (limit = 0; limit &lt;= index.Length; limit++)
              {
                  Console.WriteLine("Please Enter Subject Name " + limit + 1);
                  Subjects[limit] = Console.ReadLine();
              }
              return Subjects;
          }
      }
  </code></pre>