This documentation is archived and is not being maintained.

Delegate.Delegate(Object, String) Constructor

Initializes a delegate that invokes the specified instance method on the specified class instance.

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

protected Delegate (
	Object target,
	string method
protected Delegate (
	Object target, 
	String method
protected function Delegate (
	target : Object, 
	method : String
Not applicable.



The class instance on which the delegate invokes method.


The name of the instance method that the delegate represents.

Exception typeCondition


target is a null reference (Nothing in Visual Basic).


method is a null reference (Nothing in Visual Basic).


There was an error binding to the target method.

This constructor is called by a compiler-generated delegate type to create a delegate based on the name of an instance method and an instance of the class that defines that method.

This constructor creates delegates for instance methods only. An instance method is a method that is associated with an instance of a class; a static method is a method that is associated with the class itself.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, 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