Please let other users know how useful this tip is by rating it below. Do you have a tip or code of your own you'd like to share? Submit it here for your chance to win a free .NET programming book in our monthly tip contest!
Even if you pass an "object" ByVal, it is really passed ByRef. In the example below, the background color of the textbox that was passed with be change to red and the value will persist after the sub completion.
Protected Sub example (ByVal txt as TextBox)
txt.BackColor = Color.Red End Sub