Safer unsafe code for .NET