title: How to Use BinaryFormatter in windows phone 7
body: <p>How can I use BinaryFormatter in Windows Phone 7.</p>
  
  <p>I use this <code>using System.Runtime.Serialization.Formatters.Binary</code> in service1.svc.cs but I can't use this Reference in windows phone 7.</p>
  
  <p>Is there any solution to this?</p>
  
  <p>My Code For DeserializeObject</p>
  
  <pre><code> public static T DeserializeObject&lt;T&gt;(byte[] xml)
      {
          BinaryFormatter xs = new BinaryFormatter();
          MemoryStream memoryStream = new MemoryStream(xml);
          return (T)xs.Deserialize(memoryStream);
      } 
  </code></pre>
  
  <p>BinaryFormatter gives error in windows phone 7. So how can I <strong>Deserialize</strong>. What changes that I have to do in this code? </p>