Own object as Parameter

Feb 19, 2010 at 12:50 PM

Hello!

I would like to know if it's possible to give custom object as parameters
I means, I've an object type that override the common operators (+,- etc) and I want to know if it's possible to use it as parameters

Sample:

Expression e = new Expression("[x] * [y]");
e.Parameters["x"] = myObjectA;
e.Parameters["y"] = myObjectB;

Console.WriteLine(e.Evaluate());

Thanks for your help !
Coordinator
Feb 27, 2010 at 7:41 AM

I don't really know if it is possible. I will check. I have a class to handle which operation has to be done between types. I should check there if there is an operator overload for those objects. I had this message as a work item.

Sébastien

Coordinator
Feb 27, 2010 at 7:41 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Feb 27, 2010 at 10:21 AM

 

Thanks !

I've added some info to the work item, hope it can help

Mar 2, 2010 at 2:01 PM

Hi,

I tried to use the NClc.dll assembly that is present at http://ncalc.codeplex.com . But, it displayed an error message saying that, "It is not possible to add, as it is not built against silverlight runtime....."

Do anyone let me know what might be the reason?

Thank you,

Regards

Ashok

 

Coordinator
Mar 2, 2010 at 2:03 PM

ANTLR is not compatible with Silverlight. Someone in the forums managed to get it working and I'd like to know how !

Jun 15, 2011 at 2:51 PM

Sebastian,

have you received any information on how to run nCalc in Silverlight ?

Thanks a lot

Frank