System.Runtime.Serialization.CodeGenerator.VerifyParameterCount C# (CSharp) Method

VerifyParameterCount() private method

private VerifyParameterCount ( MethodInfo methodInfo, int expectedCount ) : void
methodInfo System.Reflection.MethodInfo
expectedCount int
return void
        internal void VerifyParameterCount(MethodInfo methodInfo, int expectedCount)
        {
            if (methodInfo.GetParameters().Length != expectedCount)
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ParameterCountMismatch, methodInfo.Name, methodInfo.GetParameters().Length, expectedCount)));
        }