Fundamentals

As we already mentioned, Mono supports two different types of code: safe code and unsafe code. The idea behind safe code is that there is no unsafe code in it, which means that it's some sort of pointer-free area. There are some additional restrictions, but pointers are definitely the most important one.

When talking about safe and unsafe code, people often think about managed and unmanaged code. To make those terms a little bit clearer, we have included a simple overview:

  • Safe code: Safe code means that it can be executed safely without killing an entire application because of troubles related to memory management and pointers.

  • Unsafe code: Within unsafe code, it's possible to use pointers and other unsafe features. Unsafe 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.