Delegate.Target Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets the class instance on which the current delegate invokes the instance method.

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

Syntax

'Declaration
Public ReadOnly Property Target As Object
public Object Target { get; }

Property Value

Type: System.Object
The object on which the current delegate invokes the instance method, if the delegate represents an instance method; nulla null reference (Nothing in Visual Basic) if the delegate represents a static method.

Exceptions

Exception Condition
MethodAccessException

Application code attempts to access this member late-bound, for example, by using the Type.InvokeMember method.

Remarks

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.

If the delegate invokes one or more instance methods, this property returns the target of the last instance method in the invocation list.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

See Also

Reference