title: How do I access variables in Main() from different method
body: <p>Im trying to access a the array fortune from my DisplayFortune method but it says it doesnt exist in the current context. Any help would be appreciated. Im new to c#. </p>
  
  <pre><code>static void Main()
  {
      // Write your main here.
      string[] fortune = { "String 1", "String 2", "String 3", "String 4", 
      "String 5", "String 6" };
      Random rand = new Random();
      int index = rand.Next(fortune.Length);
      WriteLine(fortune[index]);
      ReadLine();
  }
  
  public static void DisplayFortune(string first, string second)
  {
      WriteLine(fortune[index]);
  
  }
  </code></pre>