Just want to share a couple of discoveries I've just made (for myself) about visual basic.

1. Did you know that you don't need to specify that boring
Code:
sender As System.Object, e As System.EventArgs
in the event handlers any more if you don't need the sender part.

I just wrote

vb Code:
  1. Private Sub Form1_Load() Handles Me.Load
  2.         MessageBox.Show("test")
  3.     End Sub

and it was compiled without. Imagine that!

2. What I missed the most is the true conditional operator (like the one in my signature). IIf was a poor substitution since it is really a function, not a ternary operator and it evaluated all its arguments which defeated the initial purpose of this language construction. To my amazement, I only just discovered the If operator which happens to be just that - a ternary operator. So, you can simply do this:

vb Code:
  1. TextBox1.Text = If(IsDbNull(value), "", value.ToString())

Perhaps I didn't tell anything new to someone, but I'm sure, there are people who might find this information useful.