System.Reflection.Binder.Default.check_arguments C# (CSharp) Method

check_arguments() private static method

private static check_arguments ( Type types, ParameterInfo args, bool allowByRefMatch ) : bool
types Type
args ParameterInfo
allowByRefMatch bool
return bool
			private static bool check_arguments (Type[] types, ParameterInfo[] args, bool allowByRefMatch) {
				for (int i = 0; i < types.Length; ++i) {
					bool match = check_type (types [i], args [i].ParameterType);
					if (!match && allowByRefMatch) {
						Type param_type = args [i].ParameterType;
						if (param_type.IsByRef)
							match = check_type (types [i], param_type.GetElementType ());
					}
					if (!match)
						return false;
				}
				return true;
			}