4

I want to create Mathematics Expression Evaluator in Silverlight. To do that easily, I need compilation on the fly using System.Reflection, System.Reflection.Emit, System.CodeDom.Compiler, and other related assemblies.

However, I cannot find this class available in Silverlight.

Give me some suggestion please.

Matthew Murdoch
  • 30,874
  • 30
  • 96
  • 127
Yuko
  • 41
  • 1
  • The security model in SL is very stringent about Reflection. The classes exist, but you are likely to run into a fair bit of unexpected exceptions about security. – Stephan May 10 '10 at 19:02

1 Answers1

7

Silverlight doesn't do the CodeDom, System.Reflection and System.Reflection.Emit are present in the mscorlib for Silverlight.

Hence if you are going to do a expression evaluator you'll need to emit IL for the expressions.

Alternatively if you can use Javascript you could get the host browser to perform the evaluation.

AnthonyWJones
  • 187,081
  • 35
  • 232
  • 306