IsMandatoryParameter() публичный статический Метод

Determines the parameter does not have a default value explicitly specified.
public static IsMandatoryParameter ( this p ) : bool
p this
Результат bool
Пример #1
0
        static int MandatoryParametersCount(ParameterInfo[] ps, int from)
        {
            // gets count of parameters that are mandatory (last parameter that does not have a default value(is not optional))

            int lastmandatory = -1;

            for (int i = from; i < ps.Length; i++)
            {
                if (BinderHelpers.IsMandatoryParameter(ps[i]))
                {
                    lastmandatory = i;
                }
            }

            return(lastmandatory - from + 1);
        }