C# or C++ code in the .NET framework can be immune to buffer overflows
if the code is managed. Managed code is the code that is executed by a .NET virtual
machine, such as Microsoft’s. Before the code is run, the Intermediate
Language is compiled into native code. The managed execution
environment’s own runtime-aware complier performs the compilation;
therefore the managed execution environment can guarantee what the code
is going to do.