title: Accessing a string from an if function inside of the returned program
body: <p>Pretty much, I want to use the variable 'username' in the program that the if function returns, however this program is located in my program.cs, and the if function is not. </p>
  
  <p>Wasn't able to get the public static string in the if function, maybe this is obvious to experienced coders but I'm a beginner.</p>
  
  <p>I tested it out by having the console print the variable value, with no success.</p>
  
  <p>The if function:</p>
  
  <pre><code>public class WeeWoo : ChatBot
  {
  
      public static Dictionary&lt;string, string&gt; whitelisted;
  
      static WeeWoo()
      {
          string json = File.ReadAllText("whitelists/walls.json");
          var data = JsonConvert.DeserializeObject&lt;dynamic&gt;(json);
          whitelisted = data.ToObject&lt;Dictionary&lt;string, string&gt;&gt;();
      }
  
      public override void GetTextAsync(string text)
      {
          string message = "";
          string username = "";
          text = GetVerbatim(text);
  
          if (text.Contains("-&gt; me"))
          {
              text = text.Replace("[", String.Empty).Replace("]", String.Empty).Replace(" -&gt; me", String.Empty);
              String[] args = text.Split(' ');
              username = args[1];
              message = args[2];
              if (message.Equals("weewoo") &amp;&amp; (whitelisted.ContainsKey(username)))
              {
                  Program.WeeWoo();
              }
          }
      }
      public static string username;
  </code></pre>