Example #1
0
 public unsafe void FixedCustomReferenceTypeNoPointerUse(CustomPinnable mem)
 {
     fixed(int *ptr = mem)
     {
         Console.WriteLine("Hello World!");
     }
 }
Example #2
0
 public unsafe void FixedCustomReferenceTypeExplicitGetPinnableReference(CustomPinnable mem)
 {
     fixed(int *ptr = &mem.GetPinnableReference())
     {
         UsePointer(ptr);
     }
 }
Example #3
0
 public unsafe void FixedCustomReferenceType(CustomPinnable mem)
 {
     fixed(int *ptr = mem)
     {
         UsePointer(ptr);
     }
 }