But I don't quite understand the limitations of where that code can run.
The unsafe code should be able to run anywhere were .NET can run.
Is Microsoft the only one who can do that?
Anybody can write the unsafe code. Though you should be careful cause there is a reason why it is called "unsafe" and you should fully understand what you are doing. The only "limitation" is that you need to add AllowUnsafeBlocks
compiler option to the project using unsafe
keyword.
Also note that with introduction of Span
and Memory
and corresponding APIs you should be able handle at least some high-performance scenarios without need for using unsafe
directly.