This project has moved and is read-only. For the latest updates, please go here.


Portable Class Library


Dear Artem Los and everyone else involved in this project,

I think that this library is an ideal candidate for turning into a Portable Class Library (PCL). I just tested, and right now you only have to change one line in the MathParser.cs file and remove the anyway redundant [assembly:ComVisible(false)] and [assembly:Guid(...)] lines in AssemblyInfo.cs to be able to target practically all PCL platforms, i.e.
  • .NET Framework 4 and higher
  • Windows 8 (f.k.a Store or Metro) and higher
  • Windows Phone Silverlight 8 and 8.1
  • Windows Phone 8.1
  • Silverlight 5
  • Xamarin.Android
  • Xamarin.iOS
The only change you need to do in the MathParser source code is to replace the call to Math.Truncate (used in line 125 in the current changeset), since this method is not available in PCL. I believe the following line should provide a sufficient replacement:
LocalFunctions.Add("truncate", x => (decimal)(x[0] < 0.0m ? -Math.Floor(-(double)x[0]) : Math.Floor((double)x[0])));
Thanks in advance!
Anders @ Cureos


artemlos wrote Oct 25, 2014 at 12:48 PM

Hi Anders,

First of all, I am so sorry for a very late response to the message. I did not receive any notification that this issue was created.

Regarding conversion to Portable Class Library: This sounds interesting! Targeting many platforms is great as it removes the need to keep creating a new library for each platform.
I will notify you once I've changed it according to the steps you mentioned!

Thank you so much for this great idea! :)

@artemlos P.S. If you would like to contact me in future, please send a message on or on Twitter (@artemlos). I will try to reply within a day or so.

wrote Nov 29, 2014 at 3:25 AM