ServiceManager.GetTarget Method
A helper method that gets the target object for a delegate.
Namespace: Microsoft.Windows.Design
Assembly: Microsoft.Windows.Design.Extensibility (in Microsoft.Windows.Design.Extensibility.dll)
Syntax
'Declaration
Protected Shared Function GetTarget ( _
callback As Delegate _
) As Object
protected static Object GetTarget(
Delegate callback
)
protected:
static Object^ GetTarget(
Delegate^ callback
)
static member GetTarget :
callback:Delegate -> Object
protected static function GetTarget(
callback : Delegate
) : Object
Parameters
- callback
Type: System.Delegate
The delegate for which to get the target.
Return Value
Type: System.Object
The target of callback.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | callback is nulla null reference (Nothing in Visual Basic). |
Remarks
This method can return nulla null reference (Nothing in Visual Basic) if the callback represents a static object.
If the delegate was created to proxy a generic delegate, this method returns the original object, not the proxy.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.Windows.Design Namespace