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!

Getting the Default Value of a Parameter

The default member can be found by getting the ParameterInfo for the parameter. This property will return the default value and type:

public Object DefaultValue {get;}

If there is no default value, this property will return Value.DBNull. For example,

MethodInfo m = t.GetMethod (“foo”);
ParameterInfo [] ps = m.GetParameters();
for (int i = 0; i < ps; I++)
{
   if (ps[i].DefaultValue != Value.DBNull)
   {
      Console.WriteLine (“Default Value == {0}[{1}]”, ps[i].DefualtValue, ps[i].DefualtValue.VariantType);
   }
}