Fixing Managed Data in Memory
using System; public class MyClass { public unsafe static void Main() { int i; int [] intArr; intArr = new int [5]; fixed(int * IntegerPointer = intArr) { for(i = 0; i < 5; i++) IntegerPointer[i] = i; } for(i = 0; i < 5; i++) Console.WriteLine(intArr[i]); } }