Content-Length: 293628 | pFad | https://github.com/pythonnet/pythonnet/issues/486

B0 Invalid method binding with specified .NET parameters · Issue #486 · pythonnet/pythonnet · GitHub
Skip to content

Invalid method binding with specified .NET parameters #486

@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
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/pythonnet/pythonnet/issues/486

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy