public void ShouldNotSerializeIntPtr() { var intPtrClass = new ClassWithIntPtr { Ptr = new IntPtr(0x666) }; try { SerializerClone(intPtrClass); Assert.Fail("Class with IntPtr was serialized without exception."); } catch (InvalidOperationException) { } }
public AnotherContainingType() { WithIntPtr = new ClassWithIntPtr(); }