title: An unhandled exception of type 'System.StackOverflowException' occurred in WindowsFormsApplication3.exe
body: <p>I'm using C# to develop a windows forms application and I required to store certain values (Ex: UserID and Role), in order to use them again in various forms throughout the application.
  The User ID and the Role will be changed with each login.</p>
  
  <p>So tried using static classes.</p>
  
  <p>To test it out first, I did the following.</p>
  
  <p>Created "Form1" with a textbox and a button.</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Data;
  using System.Drawing;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using System.Windows.Forms;
  
  namespace WindowsFormsApplication3
  {
      public partial class Form1 : Form
      {
          public Form1()
          {
              InitializeComponent();
          }
  
          private void btnDisplay_Click(object sender, EventArgs e)
          {
              common.text = textBox1.Text;
  
              Form2 obj = new Form2();
              obj.Show();
          }
      }
  }
  </code></pre>
  
  <p>Then created "Form 2" with only a label.</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Data;
  using System.Drawing;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using System.Windows.Forms;
  
  namespace WindowsFormsApplication3
  {
      public partial class Form2 : Form
      {
          public Form2()
          {
              InitializeComponent();
          }
  
          private void Form2_Load(object sender, EventArgs e)
          {
              label1.Text = common.text;
  
          }
      }
  }
  </code></pre>
  
  <p>And to interconnect these two forms, created the following class.</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  
  namespace WindowsFormsApplication3
  {
  
      public static class common
      {
  
          public static string text            
          {
              get
              {
                  return text;
              }
              set
              {
                  text = value;
              }
  
          }
      }
  }
  </code></pre>
  
  <p>The purpose was to see if the label text on form2 would change when clicked on the button after entering text into the textbox in form1.</p>
  
  <p>When running the code, the following error was thrown. Displays that this is thrown from the "set" method of the class.</p>
  
  <pre><code>An unhandled exception of type 'System.StackOverflowException' occurred in WindowsFormsApplication3.exe 
  </code></pre>
  
  <p>If anyone could provide any clarity on this, it would be highly appreciated.</p>
  
  <p>Thanks in advance.</p>