I understand pointers and the rare need to use them in C# code. My question is: what is the reasoning behind having to explicitly state \"unsafe\" in a block of code. Additi
It is largely about being verifiable. By stating unsafe
, the gloves are off - the system can no longer guarantee that your code won't run amok. In most cases it is highly desirable to stay in the safe zone.
This gets more noticeable with partial trust (addins etc), but is still valuable in regular code.