Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Pass array as a ref object to C# function #2586

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
yezhou2000 opened this issue Apr 16, 2025 · 0 comments
Closed

Pass array as a ref object to C# function #2586

yezhou2000 opened this issue Apr 16, 2025 · 0 comments

Comments

@yezhou2000
Copy link

I wanted to call a C# function from Python (currently I only have the compiled DLL file and no access to the C# source code). I’ve found that the C# function requires a ref object parameter as its input. In my Python code, I have an already defined array. How can I pass this array into the C# function correctly as a ref object?

For your reference, I’m using Python 3.7 and pythonnet version 2.5.2

@pythonnet pythonnet locked and limited conversation to collaborators Apr 16, 2025
@filmor filmor converted this issue into discussion #2587 Apr 16, 2025

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant