2 // System.Reflection/Pointer.cs
5 // Paolo Molaro (lupus@ximian.com)
7 // (C) 2003 Ximian, Inc. http://www.ximian.com
12 using System.Reflection;
13 using System.Globalization;
14 using System.Runtime.CompilerServices;
15 using System.Runtime.Serialization;
17 namespace System.Reflection {
21 public unsafe sealed class Pointer : ISerializable {
29 public static Pointer Box (void *ptr, Type type)
33 throw new ArgumentNullException ("type");
35 throw new ArgumentException ("type");
36 Pointer res = new Pointer ();
42 public static void* Unbox (object ptr)
44 Pointer p = ptr as Pointer;
46 throw new ArgumentException ("ptr");
50 void ISerializable.GetObjectData (SerializationInfo info, StreamingContext context)
52 throw new NotSupportedException ("Pointer deserializatioon not supported.");