using System.Globalization;
using System.Runtime.Serialization;
using System.Runtime.ConstrainedExecution;
+using System.Diagnostics.Contracts;
namespace System
{
{
return (IntPtr) (unchecked (((byte *) pointer) - offset));
}
+
+ // fast way to compare IntPtr to (IntPtr)0 while IntPtr.Zero doesn't work due to slow statics access
+ [Pure]
+ [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
+ internal unsafe bool IsNull()
+ {
+ return m_value == null;
+ }
}
}