title: Reflection in Windows Phone
body: <p>The following code fails when I invoke the method.  No exceptions; everything just crashes. This code is in a Windows Phone 7 Portable Class Library, any idea what's going on?</p>
  
  <pre><code>public static object Deserialize(string input, Type type)
  {
      var castMethod = typeof(ModelBase).GetMethod("Cast").MakeGenericMethod(type);
      object castedObject = castMethod.Invoke(null, new object[] { input });
      return castedObject;
  }
  
  public static T Cast&lt;T&gt;(string input)
  {
      return JsonConvert.DeserializeObject&lt;T&gt;(input);
  }
  </code></pre>