Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Invoking .NET classes

We can invoking call .NET classes directly from Groovy scripts. Note that IKVM has a the cli prefix for all .NET namespaces. If you want to invoke Console.WriteLine('hello world'), you have to type:

...

The great thing here is that Groovy can pick a correct .NET method. You can also try:

Code Block
cli.System.Console.WriteLine('hello world {0}', 'from Groovy')

...