Unsafe Methods : unsafe « unsafe « C# / CSharp Tutorial






using System;
   
public class MyClass
{
    public unsafe static void Main()
    {
        int MyInteger = 123;
        int * MyIntegerPointer = &MyInteger;
   
        Console.WriteLine(*MyIntegerPointer);
    }
}








36.1.unsafe
36.1.1.Unsafe Code
36.1.2.Compile unsafe code
36.1.3.Using unsafe and fixed
36.1.4.Mark method as unsafe to pointers
36.1.5.Accessing Structure Members with a Pointer
36.1.6.Unsafe Methods
36.1.7.Using the unsafe keyword.
36.1.8.unsafe block