In .net 4 static Add() and Subtract() methods have been added.
IntPtr ptr = IntPtr.Add(oldPtr, 2);
http://msdn.microsoft.com/en-us/library/system.intptr.add.aspx
More Related Contents:
- How to pass a nullable type to a P/invoked function [duplicate]
- How to deal with files with a name longer than 259 characters?
- Win32 API function to programmatically enable/disable device
- Turn a simple C# DLL into a COM interop component
- Working example of CreateJobObject/SetInformationJobObject pinvoke in .net?
- Bring a window to the front in WPF
- Best way to access COM objects from C#
- Unblock File from within .net 4 c#
- No console output when using AllocConsole and target architecture x86
- How do I handle null or optional DLL struct parameters
- How do I pinvoke to GetWindowLongPtr and SetWindowLongPtr on 32-bit platforms?
- Using a 32bit or 64bit dll in C# DllImport
- Capture screen on server desktop session
- Set System Time Zone from .NET
- Interoperating between Matlab and C#
- Change keyboard layout from C# code with .NET 4.5.2
- Releasing temporary COM objects
- Target 32 Bit or 64 Bit native DLL depending on environment
- Is there a tool that generates P/Invoke signatures for arbitrary unmanaged DLL?
- Synchronizing 2 processes using interprocess synchronizations objects – Mutex or AutoResetEvent
- Send message to a Windows process (not its main window)
- How to dynamically load and unload a native DLL file?
- .Net Excel Interop Deleting a worksheet
- Deserialize JSON into C# dynamic object?
- Should I avoid ‘async void’ event handlers?
- What is [Serializable] and when should I use it?
- Passing a single item as IEnumerable
- ZipArchive creates invalid ZIP file
- How do I create a C# app that decides itself whether to show as a console or windowed app?
- Merge cells in datagridview