mike mcintyre's

.N e t J o u r n a l

This blog hosted by:
http://blogs.vbcity.com      
  Home :: Syndication  :: Login

AprMay 2008Jun
SMTWTFS
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567

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