Skip to content

Special Parameter not Converting Correctly #916

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sekkit opened this issue Jul 22, 2019 · 2 comments
Closed

Special Parameter not Converting Correctly #916

sekkit opened this issue Jul 22, 2019 · 2 comments

Comments

@sekkit
Copy link

sekkit commented Jul 22, 2019

Environment

  • Pythonnet version: latest
  • Python version: 3.7.4
  • Operating System: Win10 1903

Details

  • Describe what you were trying to get done.
    class logger
    {
    public static void error(params object[] msgs)
    {
    //
    }
    }

    In Pyscript:
    logger.error("helloworld")

    the parameter msgs in C# stack, will become ['h', 'e', 'l', ..., 'd']

    Conclusion: parameter is not converted correctly.

@Cronan
Copy link
Contributor

Cronan commented Jul 23, 2019

As a workaround, please try:

logger.error(new object[] { "helloworld" })

@sekkit
Copy link
Author

sekkit commented Jul 23, 2019

As a workaround, please try:

logger.error(new object[] { "helloworld" })

Yes, I used the alternative way to bypass that bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants