Safer unsafe code for .net