title: C# FormatException without any numeric or null value parsing involved
body: <p>This line is throwing a FormatException:</p>
  
  <pre><code>var dataString = string.Format("email_address:{0}, status:subscribed, merge_fields:{1}", "a", "b");
  </code></pre>
  
  <p>No doubt the problem is obvious, but I am not seeing it.</p>
  
  <p>Here is the function:</p>
  
  <pre><code>   public static string AddSubscriber(string listId, Subscriber subscriber) {
  
              string url = string.Format("https://us10.api.mailchimp.com/3.0/lists/{0}/members/", listId);
  
              var req = (HttpWebRequest)WebRequest.Create(url);
              req.Method = "POST";
              req.ContentType = "application/json";
              req.Headers.Add("AUTHORIZATION", basicAuth);
  
              var mergeFieldJson = subscriber.MergeFields();
              var dataString = string.Format("email_address:{0}, status:subscribed, merge_fields:{1}", "a", "b"); // subscriber.email, mergeFieldJson);
  
              /*
              byte[] data = System.Text.Encoding.UTF8.GetBytes(dataString);
              using (var stream = req.GetRequestStream()) {
                  stream.Write(data, 0, data.Length);
              }
  
              HttpWebResponse response = (HttpWebResponse)req.GetResponse();
  
              return new StreamReader(response.GetResponseStream()).ReadToEnd();
              */
              return "";
          }
  </code></pre>
  
  <p>Here is the exception:</p>
  
  <pre><code>Input string was not in a correct format. 
      at System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args)
      at System.String.Format(IFormatProvider provider, String format, Object[] args)
      at MailChimpLib.MailChimp.AddSubscriber(String listId, Subscriber subscriber) in d:\Development\GTPRepository\team24x7\trunk\MailChimpLib\MailChimp.cs:line 40
      at team24x7.Controllers.StoreController.AddTestSubscriber() in d:\Development\GTPRepository\team24x7\trunk\team24x7\api_source\Controllers\StoreController.cs:line 167
  </code></pre>
  
  <p>Line 40 is the line with the string.Format(..).</p>
  
  <p>Here is the MergeFields function:</p>
  
  <pre><code>   public string MergeFields() {
          return string.Format("{'Email':'{0}','First Name':'{1}','Last Name':'{2}','Mascot':'{3}','Store Link':'{4}','School':'{5}'}",
              email, firstname, lastname, mascot, storelink, school
          );
      }
  </code></pre>
  
  <p>For me it works in debug mode, but causes an exception in the line following the call to it in release mode.</p>
  
  <p>No doubt the problem is related to the silly and erroneous attempt to include the initial and ending curly brace in the format string. (Stupidity cursed.)</p>