title: Why BinaryFormatter silently breaks process?
body: <p>I'm trying to serialize object with following procedure:</p>
  
  <pre><code>    public static byte[] ObjectToByteArray(Object obj) {
          if (obj == null)
              return null;
          using (MemoryStream ms = new MemoryStream()) {
              BinaryFormatter bf = new BinaryFormatter();
              bf.Serialize(ms, obj);
              return ms.ToArray();
          }
      }
  </code></pre>
  
  <p>I've got break point on <code>bf.Serialize(ms, obj);</code> and I can check that my object is fine there but when I go to the next step it just breaks operation without any errors or saying anything. I even don't know how should I debug it for now. Any ideas?</p>