title: Concerns over making Methods available across multiple forms in c# WinForms
body: <p>I would like to know if my approach towards making methods available across multiple forms is safe, or if there are possible issues with my approach that I'm unaware of.</p>
  
  <p>I'm currently working on an application with over a dozen forms and there are certain methods that are called by many of those forms, so instead or recreating them on each form, I created a new class called <code>Globals.cs</code> and inside this class I create a series of classes and methods that I call throughout my application.</p>
  
  <p>I haven't noticed any issues with my setup as of yet, but my concern is, what happens if one of my methods inside my Globals.cs would be called simultaneously by different forms? I have void methods that write passed in data to SQL Tables and I have methods that return data.</p>
  
  <p>I use <code>BackGroundWorkers</code> in some forms, what would happen if one of these methods was called simultaneously by either two different Workers, or by a Worker and a method call on an other form?</p>
  
  <p>Here is a sample of my Globals.cs class and a few of the methods inside.</p>
  
  <pre><code>class Globals
  {
      public static string getUserSetting(string userID, string form, string obj_name)
      {
          string value = "";
              // Get setting value from SQL Table and assign it to return variable
          return value;
      }
  
      public static void saveUserSetting(string userID, string form, string obj_name, string value)
      {
          // Save Passed in settings to SQL Table
      }
  
      public static string getEnviro()
      {
          if (!string.IsNullOrEmpty(Settings.Default.EnvironmentDefault))
              return Settings.Default.EnvironmentDefault.ToString();
          else
              return "Live";
      }
  
      public class Properties
      {
          public static System.Drawing.Color colorPropertyFromString(string stringValue)
          {
              System.Drawing.Color returnValue = System.Drawing.Color.Empty;
              if (!string.IsNullOrEmpty(stringValue))
              {
                  int colorIntVal = -1;
                  bool output;
                  output = int.TryParse(stringValue, out colorIntVal);
  
                  returnValue = System.Drawing.Color.FromArgb(colorIntVal);
              }
              return returnValue;
          }
      }
  }
  
  
  /*
      I use this Class to create new instances of SqlConnections through my application. 
      Example: If I need a new SqlConnection I would go:
      SqlConnection conn = new SqlConnection(Conn.ConnectionString);
  */
  public sealed class Conn
  {
      public static string ConnectionString = Settings.Default.ArborgConnectionString.ToString();
  }
  </code></pre>