Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Invalid method binding with specified .NET parameters #486

Copy link
Copy link
@Konstantin-Posudevskiy

Description

@Konstantin-Posudevskiy
Issue body actions

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.