Exemplo n.º 1
0
        static void Main(string[] args)
        {
            var safeptr1 = SafePtr.Create("Hello");
            var safeptr2 = SafePtr.Create("Hello Hello");

            safeptr1.SetPointer(safeptr2);
            Console.WriteLine("Printing just 'Hello', but:");
            Console.WriteLine(safeptr1.Object);
            Console.WriteLine(safeptr1.IntPtr.ToInt32());
            Console.ReadKey();
        }
Exemplo n.º 2
0
 public void SetPointer(SafePtr another)
 {
     Pointer.IntPtr = another.Pointer.IntPtr;
 }