8000 Invalid method binding with specified .NET parameters · Issue #486 · pythonnet/pythonnet · GitHub
[go: up one dir, main page]

Skip to content
Invalid method binding with specified .NET parameters #486
Closed
@Konstantin-Posudevskiy

Description

@Konstantin-Posudevskiy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0