Invalid method binding with specified .NET parameters
Environment
- Pythonnet version: 2.3.0.0
- Python version: 3.5.3
- Operating System: Windows 10.
Details
- Call to .NET method fails with passed arguments (Double.NegativeInfinity, Double.PositiveInfinity, Single.NegativeInfinity, Single.PositiveInfinity).
There is an example, how you can reproduce this bug.
C# code
namespace Bugs { public class InvalidMethodBinding { public static void WriteDouble(System.Double value) { System.Console.WriteLine(value); } } }
Python code:
import clr clr.AddReference('PathToDll') from System import Double from Bugs import * InvalidMethodBinding.WriteDouble(0.01) InvalidMethodBinding.WriteDouble(Double.NegativeInfinity)
- Traceback:
Traceback (most recent call last): 0.01 File "X", line Y, in <module> Program.WriteDouble(Double.NegativeInfinity) TypeError: No method matches given arguments