Using reflection emit and the technique described in this post (with sample code):
http://www.xtremedotnettalk.com/showthread.php?t=96952
I was able to invoke an instance method on a class.
The only change necessary is the constructor of the DynamicMethod. The sample code uses this constructor, which is not allowed in Silverlight (for security):
[SecurityCriticalAttribute]
public DynamicMethod(
string name,
Type returnType,
Type[] parameterTypes,
Type owner
)
Change it to this one:
public DynamicMethod(
string name,
Type returnType,
Type[] parameterTypes
)