I'm completely new to coding, and have been trying do a lot of at home research. I'm currently using VB 2012 and have noticed that on a lot of forums people have
(ByVal Sender as Object,...
present when I load up a button or form, my code automatically comes up as (Sender as object...
. My question is what is the difference between the two and how do they separately affect the program?
Me:
Private Sub Button1_Click(sender As Object, e As EventArgs)
'Handles Button1.Click
End Sub
Random:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
'Handles Button1.Click
sayHello(sender)
End Sub