mike mcintyre's

.N e t J o u r n a l

vbCity Blogs moved to:
http://cs.vbcity.com/blogs
  Home :: Syndication  :: Login

OctNovember 2009Dec
SMTWTFS
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345

Archives

Topics

Source Code

Relaxed delegate conversion, introduced in Visual Basic 2008, enables you to assign subs and functions to delegates or handlers even when the signatures are not identical. Therefore, binding to delegates becomes consistent with the binding already allowed in method invocations. 

In Visual Basic prior to 2008:

Sub OnClick(ByVal sender As Object, ByVal e As EventArgs) Handles RunButton.Click
    MessageBox.Show("Visual Basic prior to VB 2008")
End Sub

In Visual Basic 2008 (VB9)

Sub OnClick() Handles RunButton.Click
    MessageBox.Show("Look Mom, no parameters!")
End Sub

Details:  Relaxed Delegate Conversion

Mike McIntyre
www.getdotnetcode.com

 

posted on Thursday, May 01, 2008 6:59 PM