<p>I was wondering if the C# project setting "Allow unsafe code" applies only to unsafe C# code in  the project itself, or is it necessary to set this option when linking in a native C++ DLL? What about linking in a managed DLL that itself links to a native DLL? What does this option really do, under the hood?</p>

It allows you to use the "unsafe" block.
```
```
unsafe(...)
{
}
```
```