[IronPython] Overflow error with C# dll

Kristian kristian.jaksch at gmail.com
Fri Jan 30 18:08:58 CET 2009

I've created a C# dll that I call from Ironpython (Silverlight)
application. I receive an Overflow error when I call it but I can't
see that anything is wrong. Everything works as expected. The error is

"OverflowError: Arithmetic operation resulted in an overflow."

But when I call the same dll from a C#-project I don't get any errors.
The method I call in the dll is the below:

"public int[,] CalculatePlotSettings(double canvasWidth, double
canvasHeight, double[] values)"

I make the call as it looks below:

p = Plot()
coords = p.CalculatePlotSettings(root._parentCanvas.ActualWidth,
root._parentCanvas.ActualHeight, array)

The "array" is of type "System.Array.CreateInstance(System.Double,

Does anyone have a clue why this error occurs?

Thanks for help!

More information about the Ironpython-users mailing list