Edit: This is now available on GitHub: https://github.com/joelmartinez/Jint.Phone
|1 2 3 4||
And when we run that code in a silverlight application:
This would also work in XNA games for wp7, so one can imagine scripting scenarios if that’s your cup of tea. Though it would take more work for this to be supported on the xbox since DynamicMethod is not supported there.
I was really happy to see that Windows Phone 7.1 (Mango) brings in support for the DynamicMethod and some of the other Reflection.Emit features. One of my previous projects (New LateBinder) showed significant perf benefits to using this over regular old reflection.
I had to overcome some quirks due to the slight differences in the compact framework, but after some time I got it all working … so far all my tests have been successful (though it’s not to say it’s all fully working). Many props to the team of developers that did this over at codeplex.