Arithmetic Operations on Pointers (C# Programming Guide)
This topic discusses using the arithmetic operators + and - to manipulate pointers.
You cannot perform any arithmetic operations on void pointers.
You can also subtract pointers of the same type. The result is always of the type long. For example, if p1 and p2 are pointers of the type pointer-type*, then the expression p1-p2 results in:
((long)p1 - (long)p2)/sizeof(pointer_type)
No exceptions are generated when the arithmetic operation overflows the domain of the pointer, and the result depends on the implementation.
For more information, see the C# Language Specification. The language specification is the definitive source for C# syntax and usage.