Skip to content

How to pass *varargs? #1772

Answered by filmor
henon asked this question in Q&A
Apr 24, 2022 · 3 comments · 5 replies
Discussion options

You must be logged in to vote

You can see the available overloads here:

/// <summary>
/// InvokeMethod Method
/// </summary>
/// <remarks>
/// Invoke the named method of the object with the given arguments.
/// A PythonException is raised if the invocation is unsuccessful.
/// </remarks>
public PyObject InvokeMethod(string name, params PyObject[] args)
{
if (name == null) throw new ArgumentNullException(nameof(name));
if (args == null) throw new ArgumentNullException(nameof(args));
if (args.Contains(null)) throw new ArgumentNullException();
PyObject method = GetAttr(name);

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@henon
Comment options

Comment options

You must be logged in to vote
1 reply
@henon
Comment options

Comment options

You must be logged in to vote
3 replies
@henon
Comment options

@henon
Comment options

@henon
Comment options

Answer selected by henon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1771 on April 25, 2022 08:57.

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy