diff options
Diffstat (limited to 'src/mscorlib/shared/System/Reflection/Pointer.cs')
-rw-r--r-- | src/mscorlib/shared/System/Reflection/Pointer.cs | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/mscorlib/shared/System/Reflection/Pointer.cs b/src/mscorlib/shared/System/Reflection/Pointer.cs index 13a5efff46..55376c66c0 100644 --- a/src/mscorlib/shared/System/Reflection/Pointer.cs +++ b/src/mscorlib/shared/System/Reflection/Pointer.cs @@ -7,7 +7,6 @@ using System.Runtime.Serialization; namespace System.Reflection { - [Serializable] [CLSCompliant(false)] public sealed unsafe class Pointer : ISerializable { @@ -22,14 +21,6 @@ namespace System.Reflection _ptrType = ptrType; } - private Pointer(SerializationInfo info, StreamingContext context) - { - _ptr = ((IntPtr)(info.GetValue("_ptr", typeof(IntPtr)))).ToPointer(); - _ptrType = (Type)info.GetValue("_ptrType", typeof(Type)); - if (!_ptrType.IsRuntimeImplemented()) - throw new SerializationException(SR.Arg_MustBeType); - } - public static object Box(void* ptr, Type type) { if (type == null) @@ -51,8 +42,7 @@ namespace System.Reflection void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) { - info.AddValue("_ptr", new IntPtr(_ptr)); - info.AddValue("_ptrType", _ptrType); + throw new PlatformNotSupportedException(); } internal Type GetPointerType() => _ptrType; |