Say I have the following signature:
static extern void External(int foo, IntPtr bar);
I want to use it by default:
static extern void External(int foo = 10, IntPtr bar = default(IntPtr));
It's really? In C ++, I would use a pointer equal to 0 or null. In C #, it is not even clear if IntPtr is a value or reference.
If I called my function manually, I would use External(10, IntPtr.Zero);. I guess my question is: will it default(IntPtr)have the same behavior as IntPtr.Zero?
source
share