title: An unhandled Exception of type 'System-stack overflow Exception' occured in mscorlib.dll
body: <pre><code>class BaseData
  {
      public string DbConnection = ConfigurationManager.ConnectionStrings["OLTPPOINTER_Connectionstring"].ConnectionString;
      public string DbConnection_Report = ConfigurationManager.ConnectionStrings["OLTPPOINTER_Connectionstring"].ConnectionString;
  
      protected SqlConnection OpenConnection()
      {
          **SqlConnection conn = new SqlConnection(DbConnection);**----"StackOverflow Exception was unhandled"
  
          try
          {
              if (conn.State != ConnectionState.Open)
              {
                  conn.Open();
              }
  
              return conn;
          }
          catch { throw; }
      }
  </code></pre>
  
  <p>I used recursion,It works sometime without Exception.
  In some cases it throws an Exception:-</p>
  
  <pre><code>   SqlConnection conn = new SqlConnection(DbConnection); 
                      or
     SqlDataAdapter adpt = new SqlDataAdapter(cmd);
     adpt.Fill(ds, "DataSet");
     CloseConnection(cmd.Connection);
  </code></pre>
  
  <p>does recursive call makes the throw an Exception.How to handle it</p>