Intersoft ClientUI Documentation
DelegateReference Constructor
See Also  Send Feedback
Intersoft.Client.Framework Namespace > DelegateReference Class : DelegateReference Constructor






delegate
The original System.Delegate to create a reference for.
keepReferenceAlive
If false the class will create a weak reference to the delegate, allowing it to be garbage collected. Otherwise it will keep a strong reference to the target.
Initializes a new instance of DelegateReference.

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal delegate As Delegate, _
   ByVal keepReferenceAlive As Boolean _
)
Visual Basic (Usage)Copy Code
Dim delegate As Delegate
Dim keepReferenceAlive As Boolean
 
Dim instance As New DelegateReference(delegate, keepReferenceAlive)
C# 
public DelegateReference( 
   Delegate delegate,
   bool keepReferenceAlive
)
Delphi 
public DelegateReference( 
    delegate: Delegate;
    keepReferenceAlive: Boolean
); 
JScript 
public function DelegateReference( 
   delegate : Delegate,
   keepReferenceAlive : boolean
);
Managed Extensions for C++ 
public: DelegateReference( 
   Delegate* delegate,
   bool keepReferenceAlive
)
C++/CLI 
public:
DelegateReference( 
   Delegate^ delegate,
   bool keepReferenceAlive
)

Parameters

delegate
The original System.Delegate to create a reference for.
keepReferenceAlive
If false the class will create a weak reference to the delegate, allowing it to be garbage collected. Otherwise it will keep a strong reference to the target.

Exceptions

ExceptionDescription
System.ArgumentNullExceptionIf the passed is not assignable to .

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2012 All Rights Reserved.