Invoking Static Methods

Invoking Static Methods

To invoke the static method, first get the particular .NET type and call invoke providing method arguments.

Example how to call static method “Show” on “MessageBox”

	Javonet.getType("MessageBox").invoke("Show","Hello Javonet!");

The invoke method allows you to call any .NET static or instance method with or without arguments. Value-type arguments are automatically translated to appropriate .NET types, and you can also pass referenced arguments as explained later in this guide.

See Live Example!