public IntPtr AddrOfPinnedObject()
{
if (this.IsPinned())
{
return(GCHandle.InternalAddrOfPinnedObject(this.GetHandleValue()));
}
if (this.m_handle == IntPtr.Zero)
{
throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_HandleIsNotInitialized"));
}
throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_HandleIsNotPinned"));
}