title: Ensure a parameter is serializable?
body: <p>Okay, so let me see if I can make this as concise as possible. I am going to be passing in an <code>object</code> of an unknown type into a method that is going to internally use the <code>BinaryFormatter</code> to serialize the data it's passed (I chose this because I have no idea what the data is so it's the most abstract mechanism I could imagine). And let's assume that method looks like this <strong>currently</strong>:</p>
  
  <pre><code>public void ProvideData(Guid providerKey, ISerializable data, string dataType)...
  </code></pre>
  
  <p>Now let's assume I need to make sure what's passed to me can in fact be serialized and so that why <strong><em>I thought</em></strong> I would require the object to implement <code>ISerializable</code>. However, one issue with this model is that I can't even pass in a <code>string</code> because eventhough a <code>string</code> is <code>[Serializable]</code> it doesn't implement <code>ISerializable</code>.</p>
  
  <p>So, what is the proper way to structure this method to ensure that the value passed to me, simple or complex, is serializable?</p>