NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Explicitly

Through the use of a parameter attribute, a parameter value can explicitly be requested to be the default value. Passing Type.Missing as a value to Invoke tells the late binding service to use the default value persisted in the metadata for this value.

If Type.Missing is passed in for a parameter value and there is no default value for that parameter, an ArgumentException is thrown.

Notice that with this mechanism the default values do not have to be trailing.

It is completely up to the binder to respect these rules for Type.Missing. Some binders may choose not to support this functionality or to treat Type.Missing in some other special way.

The following code fragment is from the example in the overview:

void Foo (int a, double b = 1.2, int c = 1)
This method can be called via Type.InvokeMember as:
t.InvokeMember (“foo”, new Object[] {10, 55.3, 12});
t.InvokeMember (“foo”, new Object[] {10, 1.3, Type.Missing});
t.InvokeMember (“foo”, new Object[] {10, Type.Missing, Type.Missing });