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

BindToMethod() public method

public BindToMethod ( BindingFlags bindingAttr, MethodBase match, object &args, ParameterModifier modifiers, CultureInfo culture, string names, object &state ) : MethodBase
bindingAttr BindingFlags
match MethodBase
args object
modifiers ParameterModifier
culture System.Globalization.CultureInfo
names string
state object
return MethodBase
			public override MethodBase BindToMethod (BindingFlags bindingAttr, MethodBase[] match, ref object[] args, ParameterModifier[] modifiers, CultureInfo culture, string[] names, out object state)
			{
				Type[] types;
				if (args == null)
					types = Type.EmptyTypes;
				else {
					types = new Type [args.Length];
					for (int i = 0; i < args.Length; ++i) {
						if (args [i] != null)
							types [i] = args [i].GetType ();
					}
				}
				MethodBase selected = SelectMethod (bindingAttr, match, types, modifiers, true);
				state = null;
				if (names != null)
					ReorderParameters (names, ref args, selected);
				return selected;
			}