PInvoke

Mono enables us to use native code inside an application. Up to now, we've seen how Mono can be used to write ordinary applications. In this section, you learn to combine Mono with other software packages.

Basic Concepts

We've already mentioned that the C# compiler does not produce native code, but instead produces intermediate code. The advantage of this concept is that all languages that have an interface to .NET can be used in combination with Mono. But what can people do with code that isn't based on .NET? Software components have often been used for a long time and been extensively tested. It's definitely not a good idea to throw away code that still does a good job.

The solution is that Mono provides interfaces to external code. ...

Get Mono Kick Start now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.