Applications that are not under the control of the CLR are unmanaged. The unsafe code or the unmanaged code is a code block that uses a pointer variable and allows pointer usage in unmanaged code.
The following is the code −
static unsafe void Main(string[] args) {
int x = 100;
int* a = &x;
Console.WriteLine("Data : {0} ", x);
Console.WriteLine("Address : {0}", (int)a);
Console.ReadKey();
}