SendDelegateArguments

SendDelegateArguments
is an option to AddEventHandler and NETNewDelegate that specifies which of the delegate arguments you want to be passed to your Wolfram Language callback function.

DetailsDetails

  • To use SendDelegateArguments, you first need to load .NET/Link using Needs["NETLink`"].
  • The default value is All.
  • A list of numbers that represent argument indices can be used to specify which arguments to send. For example, SendDelegateArguments->{1,3} means to only send the first and third arguments.
  • Use None or to specify that no arguments should be sent.
  • By default, all the arguments in the delegate's signature are sent to the Wolfram Language function assigned to the delegate. If you are not interested in some or all of the arguments, you can make the callback more efficient by using SendDelegateArguments to eliminate some of the arguments.
  • Efficiency is generally only a concern for arguments that are objects, not primitive types like integers or strings.