


Unsafe code has the following properties: Unsafe code in C# isn't necessarily dangerous it's just code whose safety cannot be verified. In an unsafe context, code may use pointers, allocate and free blocks of memory, and call methods using function pointers. It creates managed objects instead.Ĭ# supports an unsafe context, in which you may write unverifiable code. In general, safe code doesn't directly access memory using pointers. NET tools can verify that the code is safe. Most of the C# code you write is "verifiably safe code." Verifiably safe code means. Unsafe code, pointer types, and function pointers
