Export (0) Print
Expand All

IReflect.GetMethod Method (String, BindingFlags)

Retrieves a MethodInfo object that corresponds to a specified method under specified search constraints.

Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll)

MethodInfo GetMethod (
	string name,
	BindingFlags bindingAttr
)
MethodInfo GetMethod (
	String name, 
	BindingFlags bindingAttr
)
function GetMethod (
	name : String, 
	bindingAttr : BindingFlags
) : MethodInfo
Not applicable.

Parameters

name

The name of the member to find.

bindingAttr

The binding attributes used to control the search.

Return Value

A MethodInfo object containing the method information, with the match being based on the method name and search constraints specified in bindingAttr.

Exception typeCondition

AmbiguousMatchException

The object implements multiple methods with the same name.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft