Main Site Documentation

Error using MathEx class


Hi Guys, i’m trying to use MathEx class, everything is right for the next code:


But if i try to use other functions like this:


I get the follow error:
An unhandled exception of type ‘System.NotSupportedException’ occurred in USBizi Application.exe

What is wrong with my code?
any help?


I’ve checked and those lines are working code.

Are you sure the error is on this exact line ?

Are you sure you have the latest firmware loaded along with the latest assemblies & VS2010 ?


Yes I’m sure, that is the line that give me a error, the exact code is this:

using System;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;

using GHIElectronics.NETMF.Hardware;
using GHIElectronics.NETMF.System;

namespace testusbizi
    public class Program
        public static void Main()
            Debug.Print( MathEx.Floor(2.4).ToString());


Anyway i will try reinstalling all the enviroment.

Thanks Bec a Fuel


Are you using the emulator? Are you sure this running on an actual hardware? See getting started guide.


I’m using the default emulator, i guess. I’ll see getting started guide.


These are GHI extensions, they do not work on the emulator.


:wall: Didn’t think at that ::slight_smile:


ooh So i’ll need some hardware for to try this code?


There is also the option of extending the emulator so that it emulates the GHI math functions but that is quite involved.


Ok guys, i understood, i’ll need the hardware.
Thanks for your help! :slight_smile: