C# statements execute in either a safe or an unsafe context. Safe context is the default, but any code using pointers requires unsafe context.
Once you have a pointer to a variable, you must ensure that the variable isn't moved in memory by the garbage collector. In C# you can "pin" a variable using the fixed statement.