title: How to transfer variables between voids
body: <p>I am getting this error:</p>
  <blockquote>
  <p>&quot;The variable 'a' is assigned but its value is never available&quot;</p>
  </blockquote>
  <pre><code>namespace test
  {
      public class Program
      {
          static void Main(string[] args)
          {
              test();
              Console.WriteLine(a);
              Console.ReadLine();
          }
  
          public static void test()
          {
              int a = 11;
          }
      }
  }
  </code></pre>